#2 Error in pchart class description

open
nobody
None
5
2010-02-04
2010-02-04
Anonymous
No

Hi,

I've noticed an error in the pchart class description: the method getLegendBox doesn't exist, the right's method's name is getLegendBoxSize.

Your example is:
// Retrieve the width and height of the legend box
$BoxSize = $MyPicture->getLegendBox($DataSet->GetDataDescription());

// Print the legend box always aligned in the top right corner with a padding of 10px
// assuming your pChart graph width is 600px
$Test->drawLegend(590-$BoxSize[0],10,$DataSet->GetDataDescription(),255,255,255);

It should be (you didn't use $MyPicture as pchart object but $Test):
// Retrieve the width and height of the legend box
$BoxSize = $MyPicture->getLegendBoxSize($DataSet->GetDataDescription());

// Print the legend box always aligned in the top right corner with a padding of 10px
// assuming your pChart graph width is 600px
$BoxSize ->drawLegend(590-$BoxSize[0],10,$DataSet->GetDataDescription(),255,255,255);

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks