Displaying a Legend
The base class used to define a legend to be added to a given chart is the IlvChartLegend class. This class inherits from the IlvShadowRectangle class. Thus, the chart legend object is a graphic object just like the chart object and is positioned independently of the chart object.
A Legend Added to a Chart shows an example of a legend that has been added to a chart. This legend is composed of three legend items and is surrounded by a filled rectangle with a shadow.
The legend items that make up the legend are represented by instances of the IlvChartLegendItem class. Each legend item is composed of two elements (see Elements of a Legend Item ):
-
The graphic part illustrates the graphical representation of data with which the legend item is associated. For example, for data displayed by markers, the graphic part will show the marker with the same color and shape.
-
The text part displays a description or a label for the represented data.