![]() |
Language Reference » Dataset functions » setXAxisName
|
|
Latest updates
Toolbox
Google AdSense
|
setXAxisName - Define the name of the X Axis This function allows you to set the name of the X Axis. This name will be displayed when drawing the chart area under the abscissa axis. Values on this axis can be defined with the setAbscissa function. Calling this function
setXAxisName($Name); Where : Name is the name that will be put on the X axis. Sample script #1 /* Create the pData object */ $MyData = new pData(); /* The abscissa axis will be named "Temperatures" */ $MyData->setXAxisName("Temperatures"); Sample script #2 ![]() $MyData = new pData(); /* Prepare some nice data & axis config */ $MyData = new pData(); $MyData->addPoints(array(1700,2500,7800,4500,3150),"Distance"); $MyData->setAxisName(0,"Maximum distance"); $MyData->setAxisUnit(0,"m"); $MyData->setAxisDisplay(0,AXIS_FORMAT_METRIC); /* Create the X serie */ $MyData->addPoints(array(1230768000,1233446400,1235865600,1238544000,1241136000,1243814400),"Timestamp"); $MyData->setSerieDescription("Timestamp","Sampled Dates"); $MyData->setAbscissa("Timestamp"); $MyData->setXAxisDisplay(AXIS_FORMAT_DATE); /* Define the graph area and do some makeup */ $myPicture->setGraphArea(60,60,660,190); $myPicture->drawText(350,55,"My chart title",array("FontSize"=>20,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); $myPicture->drawFilledRectangle(60,60,660,190,array("R"=>255,"G"=>255,"B"=>255,"Surrounding"=>-200,"Alpha"=>10)); /* Compute and draw the scale */ $myPicture->drawScale();
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has
been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 413 users have registered.
This page has been rendered in 0,01 seconds. Wiki revision 1.37.
|