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


Gets or sets a value that determines if a series or data point has an associated item displayed in the legend.


Indicates that item is shown in the legend.

Syntax

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

Return Value

True if the data point or series is displayed in the legend, otherwise False. Defaults to True.

Example

The following sample will set the ShowInLegend property for the second plotted series so that it does not display a default legend item.

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").ShowInLegend = False
End Sub

Remarks

Pie and doughnut charts by default will display each data point in the legend, with each legend entry displaying the name of the data point along with an icon that uses the color of the point. All other chart types will display series in the legend in the same manner.

To display or hide these series/data points in the legend set this property.

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.