Home forums Using CanvasJS Removing a Y-Axis

This topic contains 4 replies, has 2 voices, and was last updated by  oneworld 2 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14307

    oneworld
    Member

    I can dynamically add a Y-Axis using the addTo() method, but how can the Y-Axis be removed dynamically? I tried the remove() method but it is not working.

    #14311

    Vishwas R
    Keymaster

    @oneworld,

    remove() method doesn’t work on default axis, which means its not possible to remove axisX[0]/axisY[0].


    Vishwas R

    #14312

    oneworld
    Member

    That makes sense, except that in this scenario I am not trying to remove a default axis, but an extra axis that I just added through the addTo() method. How to remove a non-default Y-axis?

    #14315

    Vishwas R
    Keymaster

    @oneworld,

    Adding and removing axis using addTo() and remove() respectively seems to be working fine. Please take a look at this jsfiddle.

    If you are still facing any issue, kindly create a jsfiddle reproducing the issue so that we can look into it and help you out.


    Vishwas R

    #14320

    oneworld
    Member

    I was doing it wrong. Thank you for the example.

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

You must be logged in to reply to this topic.