surfaceperspective.php
Back to Chart Graphics
setPerspective($perspective);
$c->addTitle("Perspective = " . $perspective);
# Set the center of the plot region at (195, 165), and set width x depth x height to 200 x 200 x
# 150 pixels
$c->setPlotRegion(195, 165, 200, 200, 150);
# Set the plot region wall thichness to 5 pixels
$c->setWallThickness(5);
# Set the elevation and rotation angles to 30 and 30 degrees
$c->setViewAngle(30, 30);
# Set the data to use to plot the chart
$c->setData($dataX, $dataY, $dataZ);
# Spline interpolate data to a 40 x 40 grid for a smooth surface
$c->setInterpolation(40, 40);
# Use smooth gradient coloring.
$c->colorAxis->setColorGradient();
# Output the chart
$viewer->setChart($c, SVG);
}
# This example includes 6 charts
$viewers = array();
for ($i = 0; $i < 6; ++$i) {
$viewers[$i] = new WebChartViewer("chart$i");
createChart($viewers[$i], $i);
}
?>
Surface Perspective
Surface Perspective
renderHTML(), " ";
}
?>