The ChartLegend type exposes the following members.

Constructors

  Name Description
Public method ChartLegend
Initializes a new instance of the ChartLegend class.

Methods

  Name Description
Public method AssignFrom
Copies properties from another ChartLegend to the current object.
(Overrides NamedCollectionItem..::..AssignFrom(NamedCollectionItem).)
Protected method SetName
Sets the name of the current item.
(Inherited from NamedCollectionItem.)
Protected method SetNameInt
For internal use.
(Inherited from NamedCollectionItem.)

Properties

  Name Description
Public property AutoFitTextDisabled
Gets or sets a value indicating whether to NOT autosize text to fit in the legend area.

Default: False.

Public property ColumnSeparator
Gets or sets the type of separator to use for the columns.

Default: None.

Public property ColumnSeparatorColor
Gets or sets the color to use for the column separator.

Default: Black.

Public property ColumnSpacing
Gets or sets the spacing between columns as percentage of the font size.

Default: 50.

Public property CustomPosition
Gets or sets the ChartElementPosition object defining a custom position for the legend. If null, automatic positioning will be used.
Public property DockOutsideChartArea
Gets or sets a value indicating whether the title should be docked outside the chart area rather than inside the chart area. Ignored if DockToChartArea is not set.
Public property DockToChartArea
Gets or sets the name of the chart area on which to draw the legend. If omitted (or does not match any chart area name), the legend is drawn relative to the chart rather than a specific chart area.
Public property EquallySpacedItems
Gets or sets a value indicating whether legend items should be equally spaced.

Default: False.

Public property HeaderSeparator
Gets or sets the type of separator to use for the legend header.

Default: None.

Public property HeaderSeparatorColor
Gets or sets the color to use for the legend header separator.

Default: Black.

Public property Hidden
Gets or sets a value indicating whether the legend is hidden.
Public property InterlacedRows
Gets or sets a value indicating whether legend rows should use interlaced colors.
Public property InterlacedRowsColor
Gets or sets the background color to use for interlaced legend rows.

If null (default), the chart area background color will be used.

Public property Layout
Gets or sets the arrangement of labels within the legend.

Default: AutoTable.

Public property MaxAutoSize
Gets or sets the maximum size for the legend, as percentage of the chart size.

Default: 50.

Public property MinFontSize
Gets or sets the minimum size for autosized legend text.

Default: 7pt.

Public property Name
Gets or sets the unique name of the current object. If an item with the specified name already exists in the collection, an exception is thrown.
(Inherited from NamedCollectionItem.)
Public property Owner
Gets the NamedCollection containing the current object.
(Inherited from NamedCollectionItem.)
Public property Position
Gets or sets the position of the legend.

Default: RightTop.

Public property Reversed
Gets or sets a value indicating that the direction of the legend should be reversed.

Default: Auto.

Public property Style
Gets the Style object defining style properties for the legend.
Public property TextWrapThreshold
Gets or sets the number of characters after which to wrap the legend text.

Default: 25

Public property Title
Gets the ChartLegendTitle object defining properties of the legend's title.

See Also