gapbar.php
Back to Chart Graphics
setPlotArea(27, 20, 120, 100);
# Set the labels on the x axis
$c->xAxis->setLabels($labels);
if ($bargap >= 0) {
# Add a title to display to bar gap using 8pt Arial font
$c->addTitle(" Bar Gap = " . $bargap, "Arial", 8);
} else {
# Use negative value to mean TouchBar
$c->addTitle(" Bar Gap = TouchBar", "Arial", 8);
$bargap = TouchBar;
}
# Add a bar chart layer using the given data and set the bar gap
$c->addBarLayer($data)->setBarGap($bargap);
# Output the chart
$viewer->setChart($c, SVG);
# Include tool tip for the chart
$viewer->setImageMap($c->getHTMLImageMap("", "", "title='Production on {xLabel}: {value} kg'"));
}
# This example includes 6 charts
$viewers = array();
for ($i = 0; $i < 6; ++$i) {
$viewers[$i] = new WebChartViewer("chart$i");
createChart($viewers[$i], $i);
}
?>
Bar Gap
Bar Gap
renderHTML(), " ";
}
?>