Sign in to follow this  
hostspring

padding y axis min/max values

Recommended Posts

Is there a way to pad the min/max value of the y axis scale in Line Chart? So if the minimum plotted value is zero (0), I'd like to see -1 on the chart even though no data is plotted to that value. This just adds a little space to the top/bottom of the plotted data. Similar to what jpgraph offers as described below:

 

 

 

JPGraph option:

 

Use the SetGrace() to specify some extra space (as percentage of the scale) between the min/max value and the limits of the scale. For example $graph->yscale->SetGrace(10) gives 10% extra space at the ends.

 

 

 

Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this