Login Register Wishes Forum About
Language Reference » Dataset functions » setScatterSerie
Help topics
Latest updates
4669d  replaceImageMapTitle
4669d  replaceImageMapValues
4669d  createFunctionSerie
4669d  setAbsicssaPosition
4669d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
setScatterSerie - Create a scatter serie

This function allows you to create a scatter serie using the 1st parameter as X coordinates and 2nd as Y ones. By default a scatter serie with an ID of 0 will be created, if you want to create another scatter serie, specify its unique ID with the ID parameter.

Calling this function

Where :

SerieX is the name of the serie that will be used for X axis positions.
SerieY is the name of the serie that will be used for Y axis positions.
ID is an optional parameter to define the scatter serie unique ID.

Sample script

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

 /* Create the two data series that will be used for the scatter coordinates */
 $MyData->addPoints(array(1,2,3,4),"My Serie X");
 $MyData->addPoints(array(4,3,2,1),"My Serie Y");

 /* Associate the two series to create a scatter serie */
 $MyData->setScatterSerie("My Serie X","My Serie Y");

This will create a scatter serie with the following points : (1,4), (2,3), (3,2), (4,1).
Last updated on 01/26/2011 
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. 415 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.