PHP pChart x-axis Label Angle

Ewan Heming picture Ewan Heming · Feb 28, 2011 · Viewed 8k times · Source

Does anyone know how to change the angle of the x-axis labels in pChart? I need to slant them so a longer timeframe can be displayed in a single graph.

Answer

linepogl picture linepogl · Feb 28, 2011

For pChart 2, it can be configured with the 'LabelRotation' format option of the drawScale method:

$image->drawScale( array( ... , 'LabelRotation'=>10  , ... ) );

Have look at the documentation of the drawScale: http://wiki.pchart.net/doc.doc.draw.scale.html