Gets or sets the map area attributes of a default legend item created for a series or data point.
Other attributes of the legend map area.
Visual Basic (Declaration) | |
---|---|
Public Property LegendMapAreaAttributes As String |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public string LegendMapAreaAttributes {get; set;} |
Return Value
A string expression representing the map area attributes of a default legend item. Defaults to a zero-length string.
The following sample specifies a client-side javascript function to execute when the user clicks on the legend item for a series named Series1.
Visual Basic | Copy Code |
---|---|
Chart1.Series("Series1").LegendMapAreaAttributes = "OnClick=javascript:MyFunction()" |
Pie and doughnut charts by default will display each plotted data point in the legend, and the default text for each legend entry is the name of the data point. All other chart types will display plotted series in the legend in the same manner.
Setting this property will automatically result in a client-side image map being created, and a map area will be created for the legend item with the attribute string appended to the <MAP> tag. Since the entire string is appended to the <MAP> tag multiple attributes should be separated with a space.
LegendMapAreaAttributes can be used in conjunction with the LegendHref property to specify map area attributes (e.g. Target= _Blank) as well as client-side event handlers (e.g. OnClick="MyEvent()").
Setting this property will have no effect if the Chart object's MapEnabled property is set to False (True by default).
IMPORTANT: To create an image map this way the RenderType property of the Chart object MUST be RenderType.ImageTag. It is possible to create an image map when using binary streaming, but another technique must be used. Refer to the Client-Side Mapping and Binary Streaming topic for further details.
Special keywords may be used when setting this property, and each keyword will be replaced with some type of data from the applicable chart element. Refer to the following table for a listing of all available keywords:
Keyword |
Replaced By |
#VALX |
X-value of the data point |
#VAL, #VALY, |
Y-values of the data point |
#SER |
Series name |
#LABEL |
Data point label |
#INDEX |
Data point index |
#PERCENT |
Percentage of the data point Y-value |
#TOTAL |
Total of all Y-values in the series |
#LEGENDTEXT |
Legend text |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family