Dundas Chart for ASP.NET
CustomAttributes Property
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > DataPointAttributes Class : CustomAttributes Property


Gets or sets a custom data attribute. Specific to the chart type being drawn.


Custom Data Point attributes specified as: AttrName1=Value1, AttrName2=Value2, ...

Syntax

Visual Basic (Declaration)  
Public Property CustomAttributes As String
Visual Basic (Usage) Copy Code
Dim instance As DataPointAttributes
Dim value As String
 
instance.CustomAttributes = value
 
value = instance.CustomAttributes
C#  
public string CustomAttributes {get; set;}

Return Value

A value that represents a custom data attribute.

Example

The following code snippet demonstrates how to set or get custom attributes at run-time.
Visual Basic Copy Code
' explode the first pie slice, without removing all other custom attributes For that slice
Chart1.Series("Default").Points(0)("Exploded") = "true"

' explode the first pie slice, and delete all other custom attributes for that slice
Chart1.Series("Default").Points(0).CustomAttributes = "Exploded=true"

' comma separated custom attributes can be used without causing an error when the comma is preceded by the \ symbol
Chart1.Series("Default").CustomAttributes = "PriceUpColor=255\,0\,127"

Remarks

Custom data attributes are stored using comma-separated name-value pairs (e.g. AttrName1=Value1, AttrName2=Value2, etc. ), and are specific to the type of chart being produced. For example, only pie and doughnut charts use the"Exploded" attribute.

Custom attributes can be applicable for DataPoint and/or Series objects, and how they are implemented depends on the custom attribute. For a listing of custom attributes, the chart types that they apply to and how they are implemented see the Custom Chart Attributes topic.

A single custom attribute (one name-value pair) can be set or retrieved by using an indexer instead of explicitly specifying the "CustomAttributes" property.

If the CustomAttribute value contains a comma, each comma must be preceded by a '\' character. This is useful when an RGB color value is used.

Custom attribute names are case-sensitive.

Requirements

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

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.