I want to have a dashed line with a Lineplot in JPGraph. However, if I use the appropriate method the line is drawn white instead of the specified color.
I use this code:
$graph = new Graph($this->graphW, $this->graphH);
...
$lineplot = new LinePlot($this->target_data);
$graph->Add($lineplot);
$lineplot->setLegend($this->lang[15]);
$lineplot->SetStyle('dashed');
$lineplot->setColor('red');
$graph->Stroke();
And the result is the following:

However, if I add the following to the code:
$lineplot->SetStepStyle();
So the question: How can I get the dashed line without the StepStyle and why doesn't it work without the SetpStyle?

Do all of the line styling before you add it to the graph.