threedstackarea.php
Back to Chart Graphics
setPlotArea(90, 30, 300, 240);
# Add a legend box at (405, 100)
$c->addLegend(405, 100);
# Add a title to the chart
$c->addTitle("Daily System Load");
# Add a title to the y axis. Draw the title upright (font angle = 0)
$c->yAxis->setTitle("Database\nQueries\n(per sec)")->setFontAngle(0);
# Set the labels on the x axis.
$c->xAxis->setLabels($labels);
# Display 1 out of 2 labels on the x-axis. Show minor ticks for remaining labels.
$c->xAxis->setLabelStep(2, 1);
# Add an area layer
$layer = $c->addAreaLayer();
# Draw the area layer in 3D
$layer->set3D();
# Add the three data sets to the area layer
$layer->addDataSet($data0, -1, "Server # 1");
$layer->addDataSet($data1, -1, "Server # 2");
$layer->addDataSet($data2, -1, "Server # 3");
# Output the chart
$viewer = new WebChartViewer("chart1");
$viewer->setChart($c, SVG);
# Include tool tip for the chart
$viewer->setImageMap($c->getHTMLImageMap("", "",
"title='{dataSetName} load at hour {xLabel}: {value} queries/sec'"));
?>
3D Stacked Area Chart
3D Stacked Area Chart
renderHTML(); ?>