Chart Elements - X Axis
I suggest using a little self control ;) just use the X axis auto labels and forget about it.
Don't try and make your chart too complex...
Auto X axis labels, let the chart calculate the labels:
Use UNIX (and PHP) date time objects for date/time data:
Pass in the labels for more control:
Take complete and total control over every single label:
- X Axis auto lables do the best job with minimal coding
- Look and feel of the axis elements
- The X axis is offset from either edge by default. You can turn this off.
- Label text colour, rotation and size. Style it the way you want.
- Only show some of the labels and/or grid lines, label step.
Don't forget that you can use your X axis label in the tooltip string by using the magic variable
#x_label# (see tooltip magic variables).
Thanks to dz_ (David Zoller)
for all his patches that made the X axis work like a dream.