Highcharts Demo

author(s): Torstein Hønsi

by vasagi

HTML

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

<div id="container"></div>

JavaScript

Highcharts.chart('container', {
	chart: {
  	events: {
    	load: function(){
      	this.series.forEach(function(ser){
        	if (ser.type === 'scatter' && ser.renderTarget) {          
        		ser.renderTarget.attr('clip-path', '');
          }
        });
      }
    }
  },
  boost: {
    seriesThreshold: 1e3
  },

  plotOptions: {
    line: {
      marker: {
        enabled: false
      }
    },
    series: {
    	boostThreshold: 3
    }
  },
  
  yAxis:[ {
  	min: 2,
    max: 4.5,
    maxPadding:2000
  }],
  xAxis: [{
  	min: 1,
    max: 4.5,
    margin:30000,
    clip:1
  }],

  series: [{
    data: [1, 2, 3, 4, 4],
    id: 's1',
    color: 'tomato',
     marker: {
            enabled: false,
            radius: 5 // Customize marker size
        }
  }, {
    data: [0, 0, 0, 0, 0],
    id: 's2',
    color: 'pink'
  }, {
    data: [1, 2, 3, 4, 4.05],
    linkedTo: 's1',
    type: 'scatter',
    color: 'tomato',
    marker: {
      symbol: 'circle'
    }
  }, {
    data: [0, 0, 0, 0, 0],
    linkedTo: 's2',
    type: 'scatter',
    color: 'pink',
    marker: {
      symbol: 'rectangle'
    }
  },{
  	visible: false,
    showInLegend: false
  }]
});