ChartDirector 7.1 (.NET Edition)

LegendBox.getImageCoor2


Usage

[C#]public string getImageCoor2(int dataItem [, int offsetX, int offsetY ]);
[VB]Public Function getImageCoor2(dataItem As Integer [, offsetX As Integer, offsetY As Integer ]) As String

Description

Gets the image map coordinates of an legend entry as HTML image map attributes.

The image map coordinates will be of the following format:

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

where (x1, y1) and (x2, y2) are opposite corners of the box that enclosed the legend entry. The 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.makeWebImage, BaseChart.makeImage or BaseChart.makeChart). The image map cannot be determined without creating the chart image first.

Arguments

ArgumentDefaultDescription
dataItem(Mandatory)The legend entry number, starting from 0. The first legend entry is 0. The nth legend entry is (n-1).
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 coordinates of the legend entry in HTML image map attribute format.