Skip to content Skip to sidebar Skip to footer

Jqplot - Want To Restrict Y Axis Ticks

In below code y axis values are not readable, I guess its overlapping. How to set suitable y axis tick range: $(document).ready(function(){ var line1 = [82,82];

Solution 1:

You have either to remove the tickInterval option in axesDefaults to let jqplot computes his own ticks or add the numberTicks option in axesDefaults in order to tell jqplot to draw x ticks where x is the number given to the numberTicks option.

  • If you use axesDefaults:{min:0, tickInterval:1}, jqplot will draw ticks from 0 to your maximal value with an interval of 1 unit (80+ ticks from 0 to 82).
  • If you use axesDefaults:{min:0}, jqplot will draw 5 ticks (by default) from 0 to your maximal value computing a same gap between two ticks.
  • If you use axesDefaults:{min:0, tickInterval:1, numberTicks:15}, jqplot will draw 15 ticks starting at 0 and with an interval of 1 unit (15 ticks from 0 to 14).
  • If you use axesDefaults:{min:0, numberTicks:15}, jqplot will draw 15 ticks from 0 to your maximal value computing a same gap between two ticks.

Choose the option which best fits.

Post a Comment for "Jqplot - Want To Restrict Y Axis Ticks"