Home Forums Chart Support Setting custom ticks/extremes on axes

Setting custom ticks/extremes on axes

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

    I’d like to set custom ticks on the axes (X and Y) to force the display of minimum and maximum, and eventually a custom step/interval.
    I tried to set the “interval” property, as well as “minimum”,”maximum” (also viewports.. ) and “valueFormatString”, but the result are 5 labels, with values like multiples of the interval itself (labels/ticks seems to be calculated from the interval starting from 0, not starting from the minimum axis-value, and stepping by the interval set).

    If currently there’s not a way to achieve this goal, i think the easiest solution would be to allow us to set a custom array of values (see sample below) in a ticks-array property..

    Example on scatter chart:
    minimum: 170.36,
    maximum: 725.49,
    interval: 111.026

    – Calculated ticks array: [170.36, 281,386, 392,412, 503,438, 614,464, 725.49]
    (first and last value are the same of the extremes set (min and max of the axis chart)
    CANVASJS automatic ticks result:
    – 222.05, 333.08, 444.1, 555.13, 666.16

    b) integer (easier) numbers:
    minimum: 11,
    maximum: 71,
    interval: 20

    – wanted ticks: 11, 31, 51, 71
    – actual ticks: 20 , 40 , 60



    As of now, this feature is not available.

    Bivek Singh

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

You must be logged in to reply to this topic.