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.


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
public LegendBox LegendBox {get; set;}


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.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.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



- 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

© 2019 All Rights Reserved.