Home Forums Report Bugs Axis calculation in column-chart

Axis calculation in column-chart

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

    Hi CanvasJS-Team,

    We have a problem with column-chart. Here’s an example

    This doesn’t look nice. The Y-Axis should start with 0

    Function Axis.prototype.calculateAxisParameters
    Change the checks near rangePadding in else-case
    if (min !== 0)
    min -= rangePadding;
    if (min !== 0 && !(min > 0 && min – rangePadding < 0 ))
    min -= rangePadding;

    I’m not sure, that this general change is fine, as this maybe does not make sense in other chart-types…

    I think this behavior changed with the multiple-axes system.
    Before that, it started (like it should) with 0

    Please take a look.



    We checked the behavior and discussed about it internally. It’s designed this way to handle all the chart types including specific chart types like bubble, scatter etc where this behavior is required. Your code seems to work perfectly in column chart but clips in other cases like in bubble chart. In future, we will consider this and improve the behavior based on chart types.

    Vishwas R
    Team CanvasJS


    Thank you, sounds good!

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

You must be logged in to reply to this topic.