View unanswered posts | View active topics It is currently Tue Apr 16, 2024 4:31 pm



Reply to topic  [ 1 post ] 
Labels without border 
Author Message
pChart user
pChart user

Joined: Wed Jun 27, 2012 1:22 pm
Posts: 5
Post Labels without border
Hello,
I've just started using pChart 2.x and am very satisfied about it's possibilities. Also very well documented with useful examples.

However, I'm looking for a feature that I can't find in the documentation or examples. Instead of a legend I would like to draw the series name as a label near the series on my chart (using drawLineChart with multiple series). So I'm trying to use the writeLabel function for this and only display the label for the last value of the series and force the title to be the name of each series. This works, however, I would only like to see the label as plain text, without the border and title. I've managed to just display a plain label (without the title), but still the border is drawn.

This is the call I'm doing ($yLabels is the array of the series names):
Code:
for ($i = 0; $i < $nYseries; $i++)
{
  $myPicture->writeLabel(array($yLabels[$i]),count($xValues) - 1,
  array("DrawSerieColor"=>FALSE,"NoTitle"=>TRUE,"ForceLabels"=>array($yLabels[$i]),"DrawPoint"=>FALSE,"GradientEndR"=>255,"GradientEndG"=>255,"GradientEndB"=>255));
}


Is there a way to not draw the border around the label or is there another way to display the series names as labels beside the graphs, instead of using a legend?

Thanks in advance,
Michiel


Wed Jun 27, 2012 1:43 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

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