CanvasJS provides a JFiddle at https://canvasjs.com/docs/charts/methods/chart/addto/ of how to use the addTo() method to add an extra Y-axis.
However if we modify the JFiddle code by replacing the following lines:
chart.addTo(“axisY”, {title: “Axis Y 2 Title”});
chart.data[1].set(“axisYIndex”,1);//link second dataSeries to second axisY
with:
chart.addTo(“axisY2”, {title: “Axis Y 2 Title”});
chart.data[1].set(“axisYType”, “secondary”);
chart.data[1].set(“axisYIndex”,0);
The secondary axis is successfully added, but the axis title is NOT rendered. Is this a bug or am I missing something?