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


Gets or sets the legend text of a series or data point.


Text of the item in the legend

Syntax

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

Return Value

A string expression representing the legend text. Defaults to a zero-length string.

Example

The following sample will override the default legend text for the second plotted series.

Visual Basic Copy Code
Imports Dundas.Charting.WebControl
...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Chart1.Series("Series2").LegendText = "Second Series"
End Sub

Remarks

Pie and doughnut charts by default will display each plotted data point in the legend, and the 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.

This property overrides the default text of legend items (the name of the data points or series).

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.