Load an image from a file and use it as the graphics symbol to plot the data points.
ChartDirector will automatically detect the image file format using the file extension, which must either png, jpg, jpeg, gif, wbmp or wmp (case insensitive).
Please refer to
BaseChart.setSearchPath on the directory that ChartDirector will search for the file.
In the current version of ChartDirector, data symbols are supported only in
LineLayer,
SplineLayer,
StepLineLayer and
ScatterLayer. To use data symbols in other layer types, add a
ScatterLayer on top of that layer.
© 2004 Advanced Software Engineering Limited. All rights reserved.
will be a "darker" version of the edgeColor, created by by reducing the RGB intensities of the edgeColor in half.
© 2004 Advanced Software Engineering Limited. All rights reserved.
.
yer to the chart
$layer = $c->addLineLayer2();
#Add the first line using small_user.png as the symbol.
$dataSetObj = $layer->addDataSet($data0, 0xcf4040, "Users");
$dataSetObj->setDataSymbol2(dirname(__FILE__)."/small_user.png");
#Add the first line using small_computer.png as the symbol.
$dataSetObj = $layer->addDataSet($data1, 0x40cf40, "Computers");
$dataSetObj->setDataSymbol2(dirname(__FILE__)."/small_computer.png");
#Set the line width to 3 pixels
$layer->setLineWidth(3);
#output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));
?>
© 2004 Advanced Software Engineering Limited. All rights reserved.
x axis.
$xAxis2Obj = $c->xAxis2();
$mark = $xAxis2Obj->addMark(17, 0x809933ff, "Merge with Star Tech",
"arialbd.ttf");
#Set the mark line width to 2 pixels
$mark->setLineWidth(2);
#Set the mark label font color to purple (0x9933ff)
$mark->setFontColor(0x9933ff);
#Add a copyright message at (475, 240) (bottom right of plot area) using Arial
#Bold font
$copyRight = $c->addText(475, 240, "(c) Copyright Space Travel Ltd.",
"arialbd.ttf");
$copyRight->setAlignment(BottomRight);
#Add a line layer to the chart
$layer = $c->addLineLayer();
#Set the default line width to 3 pixels
$layer->setLineWidth(3);
#Add the data sets to the line layer
$layer->addDataSet($data0, -1, "Enterprise");
$layer->addDataSet($data1, -1, "Consumer");
#Create the image and save it in a temporary location
$chart1URL = $c->makeSession("chart1");
#Create an image map for the chart
$chartImageMap = $c->getHTMLImageMap("xystub.php", "",
"title='{dataSetName} @ {xLabel} = USD {value|0} millions'");
#Create an image map for the legend box
$legendImageMap = $legendBox->getHTMLImageMap("javascript:doSomething();", " ",
"title='This legend key is clickable!'");
#Obtain the image map coordinates for the title, mark, and copyright message.
#These will be used to define the image map inline. (See HTML code below.)
$titleCoor = $title->getImageCoor();
$markCoor = $mark->getImageCoor();
$copyRightCoor = $copyRight->getImageCoor();
?>
In the following chart, the lines, legend keys, title, copyright,
and the "Merge with Star Tech" text are all clickable!
© 2004 Advanced Software Engineering Limited. All rights reserved.
01', '959', '1018', '1102');