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



Reply to topic  [ 1 post ] 
LabelFormat in writeScatterLabel 
Author Message
New pChart user
New pChart user

Joined: Fri Oct 21, 2011 6:30 pm
Posts: 3
Post LabelFormat in writeScatterLabel
I was in the need to change the label format on the writeScatterLabel-method.
I suggest a simple change in pScatter.class.php:
Code:
function writeScatterLabel($ScatterSerieID,$Points,$Format="")
{
    $LabelFormat = isset($Format["LabelFormat"]) ? $Format["LabelFormat"] : '%s / %s'; // New Line


A bit down where it say:
Code:
$Caption = $XValue." / ".$YValue;

Change to:
Code:
$Caption   = sprintf($LabelFormat,$XValue,$YValue);


This makes it possible to format the output as you please.


Thu Nov 10, 2011 6:46 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

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