Home forums Feature Requests & Feedback add centerZero feature

This topic contains 1 reply, has 2 voices, and was last updated by  Indranil Deo 3 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19869

    Ludovic
    Member

    Hello,
    As the “includeZero”, could it be possible to add the “centerZero” option to set min = – max value for at least axisY types in the Axis.prototype.calculateAxisParameters function?
    The code just after applying includeZero (//Apply includeZero) could be something like :

    if (this.centerZero) {
        // Force includeZero
        if (max < 0)
            max = 0;
        if (min > 0)
            min = 0;
        // Apply centerZero
        if (max > -min)
            min = -max;
        else 
            max = -min;
    }

    This would be much easier to do it that way instead of to update the axes min/max after rendering, and more after zooming.

    Thank you

    #19874

    Indranil Deo
    Member

    @ludovic-dtgmail-com,

    Thanks for the suggestion. I will discuss this behavior with the team for future releases.

    ___________
    Indranil Deo,
    Team CanvasJS

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

You must be logged in to reply to this topic.