Find min and max value for dateaxis in jqplot

772 views Asked by At

I am using dateaxis render for my x-axis. How can I find the min and max value from the x-axis valuse?

1

There are 1 answers

0
Ian A On

If you want the minimum/maximum x-axis value from your dataset you can use:

plot1.axes.xaxis._dataBounds.min

If you want the minimum/maximum from the x-axis (i.e. tick label) you can use:

plot1.axes.xaxis.min

where plot1 is a reference to the jqplot object. These return the minimum/maximum dates in milliseconds.

Please see this Fiddle for an example. The 2 buttons can be used to display the min or max values.