CanvasJS multiaxis bug
Basic HTML5 Chart Example
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Click on legend items to hide/unhide dataseries"
},
legend: {
cursor: "pointer",
itemclick: function (e) {
//console.log("legend click: " + e.dataPointIndex);
//console.log(e);
if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
e.dataSeries.visible = false;
} else {
e.dataSeries.visible = true;
}
e.chart.render();
}
},
axisY: {
interval:5
},
data: [{
showInLegend: true,
axisType: "secondary",
type: "line",
dataPoints: [{
x: 10,
y: 31
}, {
x: 20,
y: 35
}, {
x: 30,
y: 30
}, {
x: 40,
y: 35
}, {
x: 50,
y: 35
}, {
x: 60,
y: 38
}, {
x: 70,
y: 38
}, {
x: 80,
y: 34
}, {
x: 90,
y: 44
}
]
}, {
showInLegend: true,
type: "line",
dataPoints: [{
x: 10,
y: 25
}, {
x: 20,
y: 30
}, {
x: 30,
y: 20
}, {
x: 40,
y: 45
}, {
x: 50,
y: 30
}, {
x: 60,
y: 10
}, {
x: 70,
y: 15
}, {
x: 80,
y: 18
}, {
...