Search code examples
phpaxispchart

php pchart 2.0 x-axis abscissa position (bottom rather than top)


Using pchart 2 I am looking for a reliable (hopefully built in) way to move the abscissa (x-axis) of a bar chart to the bottom of the chart rather than the top.

As standard the x-axis renders at the top

So considering the above image, I would like to move the 'Hits' axis to the bottom of the chart.

Thanks


Solution

  • You can use :

    $MyData->setAxisPosition(0,AXIS_POSITION_BOTTOM);

    indeed, something like setAbscissaPosition would be easier.