Home › forums › Using CanvasJS › Setting custom ticks/extremes on axes
Tagged: Axis, ticks
This topic contains 1 reply, has 2 voices, and was last updated by Bivek Singh 2 years, 7 months ago.
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:
– 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:
– wanted ticks: 11, 31, 51, 71
– actual ticks: 20 , 40 , 60
As of now, this feature is not available.
You must be logged in to reply to this topic.