Legend Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns a ChLegend object that represents the legend for the specified chart.

expression.Legend

expression   Required. An expression that returns a ChChart object.

Example

This example causes the specified chart to display its legend and then sets the legend font.

  Sub AddLegend()

   ' Enable the legend for the first chart in Chartspace1.
   ChartSpace1.Charts(0).HasLegend = True

   ' Set the font for the legend.
   ChartSpace1.Charts(0).Legend.Font.Name = "Times New Roman"

End Sub