Home Forums Feature Requests & Feedback add centerZero feature

add centerZero feature

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

    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;
            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



    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.