ComponentOne Chart for .NET (2.0) Search HelpCentral 

Adding User Interaction With ImageAreas

C1WebChart and C1WebChart3D allow you to associate ToolTips and links with chart elements, so the chart responds to mouse events. This is done using an HTML image map, which is handled on the client.

The image map is defined by the ImageAreas property, a collection of chart elements with associated dynamic ToolTips and HRefs. The ToolTips allow you to specify the text that is displayed to the user when he moves the mouse over chart elements. The HRefs allow you to specify actions to be taken when the user clicks on a chart element.

You can edit the ImageAreas collection using the Properties window. Click the button to bring up an editor with a list of 11 chart elements, including ChartArea, PlotArea, Axes, ChartData, Legend, and so on.

For example, if you select ChartData and set its MapArea.Tooltip property to “{#YVAL:c}”, then the control will display the value for a point (or bar) when the user moves the mouse over the point. Note that you can use several keywords to refer to chart properties and create dynamic toolbars with no code. You can also specify the format to be used to displaying the information (the example formats the data as currency values).

This topic is discussed in detail in a later section (see Interacting with C1WebChart).


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.