Contents
Login Register Wishes Forum About
Language Reference » Dataset functions » setAxisXY
Help topics
Latest updates
2265d  replaceImageMapTitle
2265d  replaceImageMapValues
2265d  createFunctionSerie
2265d  setAbsicssaPosition
2265d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
setAxisXY - Affect an axis as a X or Y member

This function allows you to associate an axis to the X or Y direction. In almost all charts you don‘t need to call this function, it is only usefull while doing X versus Y charts.

By default all new series are binded to the X direction.

Calling this function
setAxisXY($AxisID,$Identity);

Where :

AxisID is the ID of the axis we want to edit.
Identity is the direction associated to the axis, it can be AXIS_X or AXIS_Y.

Sample script

 /* Create the pData object */
 $MyData = new pData(); 

 /* Create dumb data */
 $MyData->addPoints(array(2,4,7,9,10),"X Values");
 $MyData->addPoints(array(4,3,1,9,4),"Y Values");

 /* Associate the series to the axis */
 $MyData->setSerieOnAxis("X Values",0); // This one isn‘t needed as this is the default serie
 $MyData->setSerieOnAxis("Y Values",1);

 /* Bind the axis to the X & Y directions */
 $MyData->setAxisXY(0,AXIS_X);
 $MyData->setAxisXY(1,AXIS_Y);
Last updated on 11/23/2009 
by Jean-Damien 
Linked resources
  There is no linked topic yet.
Community comments
  No comments have been posted yet.
© 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. 411 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.