0

I have a simple line plot.... code used is below. The line appears fine. The mark at each plot point appears fine. The values show... HOWEVER, the value is behind the mark!!!! Is there a way to bring it to the front, or send the line/mark to the back?

I have also tried using a custom PNG as the mark icon... a ring with a transparent middle... that kind of works, but you can see the line running through the mark!

I'm trying to replicate something like this: example

Thanks :-)

$p1 = new LinePlot($datay1);
$graph->Add($p1);

$p1->SetWeight(10); 
$p1->SetColor("blue");
$p1->SetLegend('Line 12');
$p1->value->SetAlign('center','center'); 
$p1->value->Show();
$p1->value->SetColor('#000000');
$p1->mark->SetType(MARK_IMG_DIAMOND, 'yellow',1);
$p1->mark->SetFillColor('blue'); 
$p1->mark->SetColor('blue');
$p1->mark->SetSize(10);
$p1->mark->SetWeight(5);
$p1->SetCenter();
0

2 Answers 2

2

For anyone stumbling across this at a later date, whilst I could find no way of doing this with jpgraph, I've found it is possible with the very simple to use CanvasJS by combining a line graph with a bubble graph. The graphs do get a small 'trial' water mark unless you are entitled to a free licence, or pay.

0

disabling the graph theme shows the values.

//        $theme_class = new UniversalTheme;
//        $graph->SetTheme($theme_class);
        $graph->graph_theme = null;

ref JPGraph - Bar Graphs are not showing values

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.