Legend Appearance
This topic describes how to customize the legend appearance at design time.
You can customize the appearance of the ASP.NET Chart Control’s legend in a variety of ways - as described below.
- Use the Legend.MarkerVisible property to show or hide item markers within the legend.
- Use the LegendBase.MarkerSize property to define the size of the legend markers (in pixels).
- To use check boxes and/or markers in all legend items, set the Legend.MarkerMode property to the MarkerAndCheckBoxes or CheckBoxesAndMarkers value.
- Use the LegendBase.Visibility property to control the visibility of the legend itself.
Use the following properties to customize the appearance of the legend text: LegendBase.Font, LegendBase.EnableAntialiasing and LegendBase.TextColor.
The appearance of the legend’s background is determined by the LegendBase.BackColor, LegendBase.BackImage and LegendBase.FillStyle properties.
In addition, you can customize the appearance of the legend’s borders and shadow.
Use the LegendBase.Border property to access legend border options. Then, use the BorderBase.Color, BorderBase.Thickness and BorderBase.Visibility properties to customize their appearance.
Use the LegendPageTab.Shadow property to access the legend shadow options. Then, you can use the Shadow.Color, Shadow.Size and Shadow.Visible properties to customize its appearance.