Highcharts Demo
author(s):
Torstein Hønsi
by Torstein Hønsi
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>
JavaScript
Highcharts.wrap(Highcharts.Series.prototype, 'render', function(proceed) {
proceed.call(this);
Highcharts.each([this.group, this.markerGroup], function(g) {
if (g) {
g.attr({
translateY: g.translateY + this.index * (this.options.indexOffset || 0)
});
}
}, this);
})
Highcharts.chart('container', {
chart: {
type: 'spline'
},
plotOptions: {
spline: {
indexOffset: 2
}
},
series: [{
lineColor: "#abc",
data: [1, 2, 3, 4, 5]
}, {
lineColor: "#cba",
data: [1, 2, 3, 4]
}]
});