Home › forums › Using CanvasJS › Setting ticks for a histogram
I have the following histogram: https://jsfiddle.net/mfjbgoxp/
I’d like to have two ways of setting ticks:
1. Automatically set the ticks, such that they are evenly-spaced (i.e. 46, 49, 52, etc.), and each tick is at the center or at the left side of a bar (provided that the count is not zero, for that bin).
2. Manually specify the names of the ticks.
Labels are rendered at a fixed interval on the axis and not to every dataPoint. However, if you like to show labels to dataPoint you can use label property instead of x-value. Please take a look at this updated JSFiddle for the same.
You must be logged in to reply to this topic.