|
Arbitrary XY Chart |
Posted by Joe on Apr-29-2011 20:49 |
|
Hello,
I have created (PHP) an arbitrary XY line chart and used the following code you provided to add labels to every data point.
$c->xAxis->addMark($base_x[$a], 0x000000, $c->formatValue($base_x[$a], "{value|yyyy-mm-dd}"))->setDrawOnTop(false);
I want to set the x axis albels at an angle, what modificatio nof the following:
$labelsObj = $c->xAxis->setLabels($labels);
$labelsObj->setFontAngle(90);
do I need to use to do this with my chart? Thank you. |
Re: Arbitrary XY Chart |
Posted by Peter Kwan on Apr-29-2011 23:35 |
|
Hi Joe,
The setFontAngle code you are using already sets the axis labels (the $labels) to rotate by 90 degrees.
If you also want the "marks" to rotate by 90 degrees, you may apply the same setFontAngle to the mark object. For example:
$markObj = $c->xAxis->addMark($base_x[$a], 0x000000, $c->formatValue($base_x[$a], "{value|yyyy-mm-dd}"));
$mark->setDrawOnTop(false);
$mark->setFontAngle(90);
Hope this can help.
Regards
Peter Kwan |
|