ChartDirector 7.1 (C++ Edition)

ImageMapHandler


ImageMapHandler is a utility class to handle image maps in HTML format (that is, as <AREA> tags). It determines if a given point is on a hot spot as defined by the image map, and retrieves the hot spot parameters.

BaseChart.getHTMLImageMap can be used to generate image maps for charts automatically.

The advantages of using HTML image map format is that it is easy for developers to customize the hot spots. For example, one can create custom buttons in the chart image by drawing custom text boxes, and then create custom image maps to define the text boxes as hot spots. These custom image maps can be appended to the image maps generated by BaseChart.getHTMLImageMap using simple string concatenation.

ImageMapHandler will process the various attributes of the HTML <AREA> tags as follows:

AttributeDescription
coordsThis attribute defines the position and shape of the hot spot.
hrefThe URL specified in this attribute will become the attributes of the hot spot. The path portion of the URL will become the path attribute, while the query parameters will become the attributes of the hot spot as is.
titleThis attribute defines the tool tip text to display when the mouse moves over and stops on the hot spot.


MethodInheritedDescription
ImageMapHandler(Self)Constructs an image map handler object for the given image map.
getHotSpot(Self)Gets the hot spot under the given point as the current hot spot.
getKey(Self)Gets the key of an attribute of the current hot spot.
getValue(Self)Gets the value of an attribute of the current hot spot by using its key.
getValue2(Self)Gets the value of an attribute of the current hot spot by using its numeric index.