JQPlot - Make y axis only integers?

How can I make a chart in jqplot so that all its ticks have even whole intervals? For example, I have

yaxis: {numberTicks:16, min: 0} 

I would like to have it so that the graph stretches from 0-15, and if the graph points exceed 15, the graph will change to 0-30. Is this doable?

+4
source share
1 answer

Use tickInterval instead of numberTicks, for example:

 axes: { yaxis: { tickInterval: 15 } } 

I think this is closest to what you want, but note that having a point close to y = 15 will cause the chart to stretch to 30.

+8
source

Source: https://habr.com/ru/post/1395538/


All Articles