Skip to main content
A newer version of this page is available.

Legend.Visibility Property

Specifies whether to show the legend on a chart.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v19.2.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)]
public DefaultBoolean Visibility { get; set; }

Property Value

Type Description
DefaultBoolean

Default - the legend visibility is defined according to the adaptive layout algoritm when the chart is resized; True - the legend is visible; False - the legend is hidden. The default is DefaultBoolean.Default.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

Use the Visibility property to show or hide the legend within a chart area.

For more information, refer to Legends.

Note

The Default returned value of the Visibility property is in affect when the adaptive layout feature is enabled. So, ensure the ChartControl.AutoLayout property is set to true.

The adaptive layout feature is used to maintain a better chart appearance and layout when the chart becomes smaller.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visibility property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also