Login Register Wishes Forum About
Language Reference » Linear Bubble chart » Bubble chart basics
Help topics
Latest updates
4600d  replaceImageMapTitle
4600d  replaceImageMapValues
4600d  createFunctionSerie
4600d  setAbsicssaPosition
4600d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
Linear bubble charts basics

Require pChart 2.0.13

Linear bubble charts is a convenient way to draw data that got two parameters. In this approach, the 1st parameter is the Y axis value and the second one a value representing something link to this point. We can imagine the association "items in stock" / "items ordered" that would reflect the current status of your stock an it‘s forecast growth.

This two values have to be listed in dedicated datasets.


Let‘s assume that we got the data represented in the table bellow :

This will lead to the following declaration with the pData object structure :
 /* Create the pData object */
 $MyData = new pData();  

 /* Provide this year data */
 $MyData->setSerieDescription("ThisYear","This year");

 /* Provide last year data */
 $MyData->setSerieDescription("LastYear","Last year");

 /* Give a name to the X axis */
 $MyData->setAxisName(0,"Current stock");


You‘ll then have to update your scale before calling the drawScale() function :

 /* Scale up for the bubble chart */
 $bubbleDataSeries   = array("thisYear","LastYear");
 $bubbleWeightSeries = array("ThisYearNeeds","LastYearNeeds");

Finally, when the scale is drawn, just call the drawBubbleChart() function with the same arrays :

Last updated on 01/08/2011 
by Jean-Damien 
Linked resources
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,02 seconds. Wiki revision 1.37.