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: 3,
dataMax: 5,
tickPositions: [1,2,3,4]
}],
xAxis: {
min: 1,
max: 4,
offset: -20
},
series: [{
data: [1, 2, 3, 4, 4.05],
id: 's1',
color: 'tomato'
}, {
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
}]
});