.netCHARTING v10.3 Documentation
Example 


dotnetCHARTING Namespace > Chart Class : LegendBox Property
LegendBox Property (Chart)
Gets or sets a LegendBox object that represents the legend box.
Syntax
'Declaration
 
Public Property LegendBox As LegendBox
'Usage
 
Dim instance As Chart
Dim value As LegendBox
 
instance.LegendBox = value
 
value = instance.LegendBox
public LegendBox LegendBox {get; set;}
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.
Example
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
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
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also