Hi Treavor,
Yes, you can turn zone into a hot spot by generating an HTML image map (<area> tag) for the zone. The code structure is like (the following is in ChartDirector 7 code style):
.... create the chart as usual ....
#After adding all the data to the chart, we can auto-scale the axis, so that we
#can determine the position of the data points.
$c->layoutAxes();
#This is just a standard HTML area tag, creating using the coordinates of the zone
#(assume the zone is from y = 50 to y = 80)
$zoneImageMap = sprintf("<area shape='rect' coords='%d,%d,%d,%d' title='my tooltip here'>",
$c->getPlotArea()->getLeftX(), $c->getYCoor(50), $c->getPlotArea()->getRightX(), $c->getYCoor(80));
# Output the chart as usual
$viewer = new WebChartViewer("chart1");
$viewer->setChart($c, SVG);
# Output the image map - append the zoneImageMap to the data point image map
$viewer->setImageMap($c->getHTMLImageMap("", "", "title='Temperature at {x}:00 = {value} C'") . $zoneImageMap);
Regards
Peter Kwan |