|
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
hugo
New pChart user
Joined: Thu May 31, 2012 9:27 am Posts: 2
|
Tunning my pChart
Hi,
I'm new in pChart, i've build my chart with the values i need but now i'm not sure how to implement some transformations.
1) My scale in 0, 0.1, 0.2, 0.3, etc ... but i want to be integer jumping 1 2 3 4 etc.... How can i manage this ?
2) My graph has lots of series, is it possible to put the name of the series in the axis near "Q9" and "Q8" ? The series are showed in the legend but i prefer to take of the legend and the name of each series appears near each bar.
3) How can i separate, with a different background for example, to separate the diferent series ("Q9" and "Q8")?
Best regards, Hugo Gomes
Attachments:
File comment: My plot doubts
plots.jpg [ 154.24 KiB | Viewed 6133 times ]
|
Thu May 31, 2012 11:02 am |
|
|
chartbreaker
Experienced pChart user
Joined: Tue Aug 02, 2011 11:49 pm Posts: 34
|
Re: Tunning my pChart
answer to question 1) you can create a seperate array, like this Code: $integerUnits = array("0","","","","","","","","","","1","","","","","","","","","","2","","","","","","","","","","3","","","","","","","","","","4","","","","","","","","","","5","","","","","","","","","","6","","","","","","","","","","7","","","","","","","","","","8","","","","","","","","","","9","","","","","","","","","","10"); you put it into pData() like your other series and create your tuned abscissa Code: $MyData = new pData(); [...] $MyData->addPoints($integerUnits,"call-it-what-you-want"); [...] $MyData->setAbscissa("call-it-what-you-want"); $MyData->setAbscissaName("NGI's"); see also documentation http://wiki.pchart.net/doc.dataset.setabscissa.htmlanswer to question 2) just don't draw the legend, comment it out /* $myPicture->drawLegend([...]); */ and see also documentation http://wiki.pchart.net/doc.doc.draw.legend.htmluse writeLabel(); instead and put your small labels next to the series they belong to, and guess what, see also documentation http://wiki.pchart.net/doc.draw.writeLabel.htmlanswer to question 3) I'm not sure, perhaps you can put some partly transparent rectangles in the background, afterwards draw the scale as usual and finally draw the series Code: $myPicture->drawFilledRectangle([...]); $myPicture->drawFilledRectangle([...]); $myPicture->drawFilledRectangle([...]); [...] $myPicture->drawScale([...]); $myPicture->drawBarChart([...]); http://wiki.pchart.net/doc.doc.draw.scale.htmlhttp://wiki.pchart.net/doc.draw.rectangle.htmlhttp://wiki.pchart.net/doc.draw.gradientarea.htmlhttp://wiki.pchart.net/doc.chart.drawbarchart.html
|
Thu May 31, 2012 1:44 pm |
|
|
hugo
New pChart user
Joined: Thu May 31, 2012 9:27 am Posts: 2
|
Re: Tunning my pChart
Hi,
Thank you for the suggestions, I will try it out, the documention I've already consult it, that's how I figure it out to build the plot, but these small tunning i couldn't understand how it works on documentation.
Thanks for your help.
|
Thu May 31, 2012 2:37 pm |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 18 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|