Home forums Using CanvasJS Adding a secondary Y-Axis on-the-fly

This topic contains 2 replies, has 2 voices, and was last updated by  oneworld 1 month, 1 week ago.

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

    oneworld
    Member

    CanvasJS provides a JFiddle at http://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

    Vishwas R
    Keymaster

    @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

    oneworld
    Member

    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.