Generates an HTML image map for the axis labels.
This method should be called only after creating the chart image (eg. using
BaseChart.makeWebImage,
BaseChart.makeImage or
BaseChart.makeChart). The image map cannot be determined without creating the chart image first.
This method accepts a URL as its argument. When generating an image map, it appends query parameters to the URL to indicate which legend entry the user has clicked.
The following is an example image map generated for an axis with 3 labels.
<area shape="rect" coords="30,220,70,239" href="handler.asp?value=0&label=John">
<area shape="rect" coords="70,220,110,239" href="handler.asp?value=1&label=Mary">
<area shape="rect" coords="110,220,150,239" href="handler.asp?value=2&label=Peter">
The image map consists of multiple <area> tags, one for each label. In the "href" attributes, query parameters are appended to the URL to provide information on the label clicked.
The image map produces by ChartDirector does not include the <map> and </map> tag. This is intentional so that you can add additional custom <area> tags to the image map, or append multiple image maps together.
The format of the appended URL parameters is determined using the
queryFormat argument, which by default is:
value={value}&label={label}
The texts in curly brackets (i.e. {value}, {label}) will be replaced by the actual values when generating the image map. For example, {label} will be replaced by the label text.
Please refer to
Parameter Substitution and Formatting on all available parameters and how to format them.
In addition to customizing the query parameters, ChartDirector supports additional HTML attributes in the <area> tags using the
extraAttr argument.
For example, the following
extraAttr will add a "title" HTML attribute to every <area> tag. The "title" attribute will be displayed as "tool tip" when the mouse moves over the image map.
title='Click me for details on {label}'
Another common usage of the extraAttr argument is to add "onmouseover" and "onmouseout" HTML attributes to handle user interaction using Javascript on the browser.
© 2012 Advanced Software Engineering Limited. All rights reserved.