Jump to content

Jpgraphs mark->SetType


sandy1028

Recommended Posts

Hi,

 

$lineplot = new LinePlot($value);

//Some code................


foreach($value as $val){
if($val == 0){
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetFillColor("black");
$lineplot->mark->SetWidth(2);
}
elseif($val < 0){
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetFillColor("red");
$lineplot->mark->SetWidth(2);
}
}

 

If the 0 is in the array whole array is marked as Black. But I need Black to be plotted only at the palce where value is 0.

 

Now the problem is if 0 is in the array entire array is plotted as black.

 

How can I avoid it.

Please help me

Link to comment
https://forums.phpfreaks.com/topic/80244-jpgraphs-mark-settype/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.