Selway at Paradise

by grant

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="chart"></div>

CSS

#chart {
    min-width: 300px;
    max-width: 800px;
    margin: 0 auto;
}

JavaScript

var change = {
    465: '0 Low',
    857: '1 Low',
    1140: '2 Medium',
    1608: '3 High',
    2429: '4 Very High',
    3411: '5 Very High',
    4562: '6 Very High',
    5844: '7 Very High',
    7683: '8 Very High',
    10788: '9 Very High'
};
var change = {
    0: 'Very Low',
    500: 'Low',
    1000: 'Medium',
    15000: 'High',
    20000: 'Very High'
};
Highcharts.chart('chart', {
    chart: {
        zoomType: 'xy'
    },
    title: {
        text: 'selway'
    },
    subtitle: {
        text: 'Source: usgs.gov'
    },
    xAxis: [{
        categories: [],
        crosshair: true,
        title: {
            enabled: true,
            text: 'Paradise Gage Height in feet.',
            style: {
                fontWeight: 'normal'
            }
            }
    }],
    yAxis: [{ // Primary yAxis
        labels: {
            format: '{value} cfs',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        },
        title: {
            text: 'paradise cfs',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        }
    }, { // Secondary yAxis
    labels: {
            format: '{value} cfs',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        },
        title: {
            text: 'lowell cfs',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        },
       /* labels: {
        formatter: function() {
            var value = change[this.value];
            return value !== 'undefined' ? value : this.value;
        }
    },
    */
        opposite: true
    }],
    tooltip: {
        shared: true
    },
    legend: {
        layout: 'vertical',
        align: 'left',
        x: 120,
        verticalAlign: 'top',
        y: 100,
        floating: true,
        backgroundColor:
            Highcharts.defaultOptions.legend.backgroundColor || // theme
           ...