Home Forums Chart Support Adding a secondary Y-Axis on-the-fly

Adding a secondary Y-Axis on-the-fly

Viewing 3 posts - 1 through 3 (of 3 total)
  • #14313

    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?

    #14318

    @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

    #14321

    It works now with your latest update. Thank you Sir.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.