pChart 2.x forum http://wiki.pchart.net/forum/ |
|
combine drawSplineChart and drawFilledSplineChart in a chart http://wiki.pchart.net/forum/viewtopic.php?f=3&t=2120 |
Page 1 of 1 |
Author: | chartbreaker [ Wed Aug 03, 2011 12:11 am ] |
Post subject: | combine drawSplineChart and drawFilledSplineChart in a chart |
Hi, first I wanna say, I'm really impressed by the powerfull functions after using pChart since 24 hours yet. It's amazingly easy to use and the documentation is really good. But I have two questions First, is it possible to define a drawing method for one data-series and another method for the next series in one chart? I would like to use a spline in front of a filled spline for my two series. Second, how to set the distance between y-axis values and the axis name? Would be nice to manipulate it if the auto/default space is perceived to small. thanks in advance |
Author: | jean-damien [ Wed Aug 03, 2011 6:38 am ] |
Post subject: | Re: combine drawSplineChart and drawFilledSplineChart in a c |
Hi, Yes, it is possible: the idea is to define the series : Code: $MyData->addPoints(array(30,24,32),"This year"); $MyData->addPoints(array(28,20,27),"Last year"); Then hide one serie and draw a 1st chart : Code: $MyData->setSerieDrawable("Last year",FALSE); $myPicture->drawFilledSplineChart(); Then hide the 1st serie and re-activate the second one : Code: $MyData->setSerieDrawable("This year",FALSE); $MyData->setSerieDrawable("Last year",TRUE); $myPicture->drawSplineChart(); You can find an example here : http://wiki.pchart.net/doc.combo.charts.html. There is no option to add some extra spacing between the axis values and the axis name, I'll add this to the todo list. Kind regards, JD. |
Author: | chartbreaker [ Wed Aug 03, 2011 11:30 am ] |
Post subject: | Re: combine drawSplineChart and drawFilledSplineChart in a c |
I had browsed the combocharts already, but I didn't realize that it is what I'm looking for thanks for your quick response JD, by the way - please think also about axis-name free 360°-rotation |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |