View unanswered posts | View active topics It is currently Thu Mar 28, 2024 8:58 am



Reply to topic  [ 3 posts ] 
combine drawSplineChart and drawFilledSplineChart in a chart 
Author Message
Experienced pChart user
Experienced pChart user

Joined: Tue Aug 02, 2011 11:49 pm
Posts: 34
Post 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


Wed Aug 03, 2011 12:11 am
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post 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.


Wed Aug 03, 2011 6:38 am
Profile WWW
Experienced pChart user
Experienced pChart user

Joined: Tue Aug 02, 2011 11:49 pm
Posts: 34
Post 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


Wed Aug 03, 2011 11:30 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 3 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

Search for:
Jump to:  
cron