View unanswered posts | View active topics It is currently Sat Apr 27, 2024 12:27 pm



Reply to topic  [ 3 posts ] 
Change colour of the line 
Author Message
New pChart user
New pChart user

Joined: Sat Apr 23, 2011 10:41 pm
Posts: 2
Post Change colour of the line
Hi,

I have a line chart with some data. I've succeeded in changing the background, the border colour and so on, but I really do not understand how to change the actual line colour. Since I only have one line it can be static. The problem right now is that the default colour (which appears to be light green) does not suit my site.

How would I do this?


Sat Apr 23, 2011 10:43 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: Change colour of the line
Hi,

You can call the setPalette() function. If your data serie is named "Serie1" and your pData object called "MyData", this will looks like :

Code:
$serieSettings = array("R"=>229,"G"=>11,"B"=>11);
$MyData->setPalette("Serie1",$serieSettings);


Kind regards,
JD.


Sun Apr 24, 2011 8:42 am
Profile WWW
New pChart user
New pChart user

Joined: Sat Apr 23, 2011 10:41 pm
Posts: 2
Post Re: Change colour of the line
Thank you, that solved it! =]


Sun Apr 24, 2011 10:55 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

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