vector.php
Back to Chart Graphics
setPlotArea(55, 40, 350, 300, -1, -1, 0xc0c0c0, 0xc0c0c0, -1);
# Add a title to the chart using 18pt Times Bold Itatic font.
$c->addTitle("Vector Chart Demonstration", "Times New Roman Bold Italic", 18);
# Add a title to the y axis using 12pt Arial Bold Italic font
$c->yAxis->setTitle("Y Axis Title", "Arial Bold Italic", 12);
# Add a title to the x axis using 12pt Arial Bold Italic font
$c->xAxis->setTitle("X Axis Title", "Arial Bold Italic", 12);
# Set the axes line width to 3 pixels
$c->xAxis->setWidth(3);
$c->yAxis->setWidth(3);
# Add a vector layer to the chart using blue (0000CC) color, with vector arrow size set to 11 pixels
$c->addVectorLayer($dataX, $dataY, $dataR, $dataA, YAxisScale, 0x0000cc)->setArrowHead(11);
# Output the chart
$viewer = new WebChartViewer("chart1");
$viewer->setChart($c, SVG);
# Include tool tip for the chart
$viewer->setImageMap($c->getHTMLImageMap("", "",
"title='Vector at ({x}, {value}): Length = {len}, Angle = {dir} deg'"));
?>
Vector Chart
Vector Chart
renderHTML(); ?>