dotnetCHARTING Send comments on this topic.
LegendBox Property
See Also  Example
dotnetCHARTING Namespace > Chart Class : LegendBox Property


Gets or sets a LegendBox object that represents the legend box.

Syntax

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

Example

C#Copy Code
Chart.LegendBox.Background = new Background(System.Drawing.Color.SkyBlue);
Chart.LegendBox.CornerBottomLeft = BoxCorner.Square;
Chart.LegendBox.CornerBottomRight = BoxCorner.Square;
Chart.LegendBox.CornerTopLeft = BoxCorner.Square;
Chart.LegendBox.CornerTopRight = BoxCorner.Cut;
Chart.LegendBox.IconPath=
"icon.gif";
Chart.LegendBox.Label =  
new dotnetCHARTING.Label("",new Font("Arial",10),Color.DarkSlateBlue);
Chart.LegendBox.Line =
new Line(Color.Blue);
Chart.LegendBox.Position = LegendBoxPosition.Top;

//For complete code, see LegendBox.aspx sample
    
Visual BasicCopy Code
Chart.LegendBox.Background = new Background(System.Drawing.Color.SkyBlue)
Chart.LegendBox.CornerBottomLeft = BoxCorner.Square
Chart.LegendBox.CornerBottomRight = BoxCorner.Square
Chart.LegendBox.CornerTopLeft = BoxCorner.Square
Chart.LegendBox.CornerTopRight = BoxCorner.Cut
Chart.LegendBox.IconPath="icon.gif"
Chart.LegendBox.Label = new dotnetCHARTING.Label("",new Font("Arial",10),Color.DarkSlateBlue)
Chart.LegendBox.Line = new Line(Color.Blue)
Chart.LegendBox.Position = LegendBoxPosition.Top

'For complete code, see LegendBox.aspx sample

Remarks

Notes

- To hide the legend box use Chart.LegendBox.Position = LegendBoxPosition.None.

- When Chart.TitleBox.Position = TitleBoxPosition.FullWithLegend is set the legend box will disappear.

See Also

© 2010 All Rights Reserved.