ChartDirector 7.0 (ASP/COM/VB Edition)

ChartViewer.ClickHotSpot


Declaration

ClickHotSpot([Index As Integer, ]hotSpot As Collection, Button As Integer, Shift As Integer, X As Single, Y As Single)

Description

This event occurs when the mouse clicks on a hot spot on the chart image.

When this event occurs, the attributes associated with the hot spot will be provided to the event handler as a VB Collection object. These attributes come from query parameters in the image map that defines the hot spot. For most applications, the image map can be generated automatically using BaseChart.getHTMLImageMap.

For example, suppose the query parameters for the hot spot is:

x=0&xLabel=Mon&dataSet=0&dataSetName=Revenue&value=100

The Collection object will contain the following attributes.

AttributeValue
x0
xLabelMon
dataSet0
dataSetNameRevenue
value100

If there are two attributes with the same name in the query parameters, they will be merged into one attribute, with the values appended together, delimited using the ASCII unit separator character (ASCII code 31).

In addition to the attributes due to query parameters, the Collection object contains three additional attributes as follows:

Parameters

ParameterDescription
IndexAn integer that uniquely identifies the control if it is in a control array.
hotSpotA VB Collection object that contains attributes associated with the hot spot.
ButtonAn integer that identifies the mouse button causing the event. The left button is bit 0, right button bit 1, and middle button bit 2. A bit is set if the button is down. Only one of the bits is set.
ShiftAn integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the event occurs. The SHIFT key is bit 0, the CTRL key is bit 1, and the ALT key is bit 2. A bit is set if the key is down. Some, all, or none of the bits can be set.
XThe x coordinate of the mouse pointer when the event occur, expressed in units specified by the ScaleMode property of the ChartViewer control's container.
YThe y coordinate of the mouse pointer when the event occur, expressed in units specified by the ScaleMode property of the ChartViewer control's container.