Modifying the Legend

Whenever data exists in the chart, a Legend is automatically generated. The chart assigns the name specified in the ChartDataSeries object for the series as the series identifier. LineStyle and SymbolStyle determine the symbols that accompany the series name in the Legend. The positioning, border, colors and font used for the Legend can be customized.

To programmatically modify the Legend properties:

Sample property settings are listed below:

      Visual Basic

      C#

Note: In VB.NET, it is still possible to use the With and End With statement which may make it easier to show repeated use of the same object.

The code above would look as follows using this method:

      Visual Basic

      C#

To modify the Legend properties through the Properties window:

1.   In the Properties window, expand the Legend node.

 

 

2.   Modify the properties as desired. For more information, see 3D Chart Legend.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.