How can I add multiple background colors to different sections of a Graph in jpgraph?

25 Views Asked by At

Adding multiple background colors to the graph.

Code sample:

$graph = new Graph(700, 700);
$graph->SetScale('intint');

$ydata = [10, 20, 30];
$barplot = new BarPlot($ydata);
$graph->Add($barplot);
$graph->Stroke();

Something like that:

40|
  |    Blue Background
30|
  |    Green Background
20|
  |    Yellow Background
10|
  |    Red Background
  |________________________________________ 

Is it possible to set a background for each section or is there an alternative with this feature?

0

There are 0 best solutions below