ChartLegend Class
Represents a chart legend.
- Inheritance:
- System.ObjectChartLegend
Properties
AllowOverlap
Gets or sets a value indicating whether legend overlaps chart's plot area or resizes it.
Property Value
- System.Boolean
true if legend overlaps chart's plot area without resizing it; otherwise, false if legend doesn't overlap chart's plot area but resizes it instead.
CustomLayout
Gets or sets the legend's custom layout.
public ChartElementLayout CustomLayout { get; set; }
Public Property CustomLayout As ChartElementLayout
Property Value
The configuration of how the legend should be positioned and sized inside the chart.
Fill
Gets or sets the fill formatting options.
Property Value
The fill formatting options.
IsVisible
Gets or sets a value indicating whether legend is visible.
Property Value
- System.Boolean
true if legend is visible; otherwise, false.
Remarks
If legend is not visible, its properties won't be saved when saving a workbook into XLSX format.
Outline
Gets or sets the outline formatting options.
Property Value
The outline formatting options.
Position
Gets or sets the legend position.
public ChartLegendPosition Position { get; set; }
Public Property Position As ChartLegendPosition
Property Value
The legend position.
TextFormat
Gets or sets the text formatting options.
Property Value
The text formatting options.
Methods
Delete()
Deletes legend.
ToString()
Returns a System.String that represents this ChartLegend instance.
Returns
- System.String
A System.String that represents this ChartLegend instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).