Export (0) Print
Expand All

Legend Object

Visual Studio .NET 2003

Represents the graphical key and accompanying text that describes a chart series.

Syntax

Legend

Example

The following example sets the text and backdrop parameters for a chart legend.

Private Sub Command1_Click()
   With MSChart1.Legend
      ' Make Legend Visible.
      .Location.Visible = True
      .Location.LocationType = VtChLocationTypeRight
      ' Set Legend properties.
      .TextLayout.HorzAlignment = _
      VtHorizontalAlignmentRight   ' Right justify.
      ' Use Yellow text.
      .VtFont.VtColor.Set 255, 255, 0
      .Backdrop.Fill.Style = VtFillStyleBrush
      .Backdrop.Fill.Brush.Style = VtBrushStyleSolid
      .Backdrop.Fill.Brush.FillColor.Set 255, 0, 255
   End With
End Sub

See Also

Properties, Methods, and Events | Backdrop Object | Legend Property

Show:
© 2015 Microsoft