ChartDirector 7.1 (C++ Edition)

Layer.getImageCoor2


Usage

const char *getImageCoor2(int dataItem, int offsetX = 0, int offsetY = 0);

Description

Gets the image map coordinates of a region containing all data points at the given x-position as HTML image map attributes.

For example, in a stacked bar chart, this method will obtain the image map coordinates of the whole stacked bar, which contains multiple data points at the same x-position.

The image map coordinates will be in the following format:

shape="[shape]" cords="[x1],[y1],[x2],[y2] ..."

This format is specially designed so that it can easily be included into HTML image maps.

This method should be called only after creating the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). The image map cannot be determined without creating the chart image first.

Arguments

ArgumentDefaultDescription
dataItem(Mandatory)The x-position of the data points.
offsetX0An offset to be added to all x coordinates in the image map. This is useful if the current image will be shifted and inserted into another image. In this case, the image map will need to be shifted by the same offset.
offsetY0An offset to be added to all y coordinates in the image map. See offsetX above for description.

Return Value

A text string representing the image map coordinates of a region containing all data points at the given x-position as HTML image map attributes.