Highcharts Demo

author(s): Torstein Hønsi

by itsjustcarlos

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="height: 400px; margin: auto; min-width: 310px; max-width: 600px"></div>

JavaScript

Highcharts.chart('Macro_Analysis_error', {
    chart: {
        zoomType: 'xy'
    },
  xAxis: { min: 0,  
           max: 100,
	title: {
            enabled: true,
            text: '% Match to original macro'
        },
	startOnTick: true,
        endOnTick: true,
        showLastLabel: true
    },
    title: {
        text: 'Temperature vs Rainfall'
    },
    
    yAxis: [{ // Primary yAxis 
        min:0, 
        max: 100,
        labels: {
            format: '{value}',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        },
        title: {
            text: 'CSAT',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        }
    }],

    tooltip: {
        shared: true
    },

    series: [
{       type: 'scatter',
        name: '< 25%  Macro Match',
        data: [ [4.38,62.58]],
        color: '##CC3300',

        drilldown: '< 25%  Macro Match'
},
{
        name: '< 25%  Macro Match error',
        type: 'errorbar',
        data: [  [4.38,62.58] ],
        color: 'black',
        tooltip: {
            pointFormat: '(error range: {point.low}-{point.high} mm)<br/>'
        }

}

,
{       type: 'scatter',
        name: '25%-50% Macro Match',
        data: [ [39.97,58.90]],
        color: '#FF9933',

        drilldown: '25%-50% Macro Match'
},
{
        name: '25%-50% Macro Match error',
        type: 'errorbar',
        data: [  [39.97,58.90] ],
        color: 'black',
        tooltip: {
            pointFormat: '(error range: {point.low}-{point.high} mm)<br/>'
        }

}

,
{       type: 'scatter',
        name: '50%-75% Macro Match',
        data: [ [63.68,59.97]],
        color: '#33FF00',

        drilldown: '50%-75% Macro Match'
},
{
        name: '50%-75% Macro Match error',
        type: 'errorbar',
        data: [  [63.68,59.97] ],
        color: 'black',
        tooltip: {
            pointFormat: '(error range: {point.low}-{point.high} mm)<br/>'
       ...