ChartDirector 7.1 (C++ Edition)

QChartViewer.setImageMap


Usage

void setImageMap(const char *imageMap);

Description

Sets the image map that defines the hot spots on the chart image.

QChartViewer expects the image map to be in HTML image map format. BaseChart.getHTMLImageMap can be used to automatically generate image maps for charts.

You can include custom hot spots in the chart by appending HTML <AREA> tags to the image map. For example, you can add a custom icon to the chart and make it clickable by creating an HTML <AREA> tag for the icon and append it to the image map.

QChartViewer 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, and the attributes/values of the query parameters will become the attributes/values of the hot spot.

If the path attribute is not empty and does not start with the '~', the mouse cursor will change to the hand cursor when it is over the hot spot.
titleThe title attribute defines the tool tip to display when the mouse moves over and stops on the hot spot. QChartViewer supports both standard tooltips and CDML tooltips. Please refer to QChartViewer.setCDMLToolTipPrefix for more details.

The ImageMapHandler object, accessible via QChartViewer.getImageMapHandler, can be used to determine if the mouse cursor is over a hot spot and retrieve its attributes.

Arguments

ArgumentDefaultDescription
imageMap(Mandatory)The image map that defines the hot spots.

Return Value

None