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
    http://jsfiddle.net/wj06b7sk/

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

    Fix:
    Function Axis.prototype.calculateAxisParameters
    Change the checks near rangePadding in else-case
    Old:
    if (min !== 0)
    min -= rangePadding;
    Better:
    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.
    Thanks!

    #14502

    @schuerle,

    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

    #14504

    @Vishwas
    Thank you, sounds good!

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

You must be logged in to reply to this topic.