Contents
Login Register Wishes Forum About
Language Reference » Dataset functions » setSerieDescription
Help topics
Latest updates
2287d  replaceImageMapTitle
2287d  replaceImageMapValues
2287d  createFunctionSerie
2287d  setAbsicssaPosition
2287d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
setSerieDescription- Add a description to one serie

You can use this function to set a description to one serie. This attribute is important when you want to add a legend to you chart, this way instead of writting the serie name that may be obscur to the user, you can use an user friendly description

When creating a serie the description is set to the serie name.

Calling this function
setSerieDescription($Series,$Description);

Where :

Series is the name of the serie. (or an array of names)
Description is the description associated to the serie.

Sample script #1

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

 /* Populate some data */
 $MyData->addPoints(array(24,25,26,25,25),"My Serie 1");

 /* Set the description of "My Serie 1" */
 $MyData->setSerieDescription("My Serie 1","Temperature");

Sample script #2



 $MyData = new pData();  

 /* Prepare some nice data & axis config */
 $MyData->addPoints(array(24,-25,26,25,25),"Temperature");
 $MyData->setAxisName(0,"Temperatures");
 $MyData->addPoints(array("Jan","Feb","Mar","Apr","May","Jun"),"Labels");
 $MyData->setSerieDescription("Labels","Months");
 $MyData->setAbscissa("Labels");

 /* 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->setFontProperties(array("FontName"=>"fonts/pf_arma_five.ttf","FontSize"=>6));
 $myPicture->drawScale(array("DrawSubTicks"=>TRUE));
Last updated on 12/03/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.