You must be logged in to post your query.
Home › Forums › Chart Support › Adding a secondary Y-Axis on-the-fly
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?
@oneworld,
Thanks for reporting the issue. It was a minor bug and has been resolved. Please download the internal build from this link.
Soon we will be releasing with bug fix.
— Vishwas R
It works now with your latest update. Thank you Sir.
You must be logged in to reply to this topic. Login/Register