Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JpGraph setWeight for solid line

Tags:

jpgraph

Can you help me how to set weight of solid line on JpGraph?

Line is created with

// Create the first line
$p1 = new LinePlot($datay1);
$p1->SetStyle('solid');
$p1->SetWeight('20');
$p1->SetColor("#6495ED");
$p1->SetLegend('Line 1');
$graph->Add($p1);

With this code, line weight is 1.

But if line is defined as

$p1->SetStyle('dotted');

... weight of the line is 20px.

Can you tell me what I'm doing wrong in line definition. I need bolder solid line...

Thank you in advance!

like image 926
user198003 Avatar asked Dec 13 '11 18:12

user198003


1 Answers

I had similar problem, resolved by using $p1->SetStyle('solid') AFTER adding the lineplot to the graph:

    $p1 = new LinePlot($min_values);
    $graph->Add($p1);
    $p1->SetWeight(3); 
    $p1->SetColor("blue");
    $p1->SetLegend("Minimum Values");
    $p1->SetStyle("solid");
like image 136
sean Avatar answered Jan 03 '23 07:01

sean