Legend.MarkerMode Property
Gets or sets the appearance of the chart legend markers.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v18.2.dll
Declaration
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
[XtraSerializableProperty]
public LegendMarkerMode MarkerMode { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
<XtraSerializableProperty>
Public Property MarkerMode As LegendMarkerMode
Property Value
Type | Description |
---|---|
LegendMarkerMode | The specified legend marker mode. |
Remarks
To specify this property, use the LegendMarkerMode enumeration values. The following table lists all the possible values of the MarkerMode property.
Value | Image | Description |
---|---|---|
LegendMarkerMode.CheckBox | ![]() |
Only check boxes are shown in the legend. |
LegendMarkerMode.CheckBoxAndMarker | ![]() |
Check boxes and markers are shown in the legend simultaneously (check boxes are positioned in front of markers). |
LegendMarkerMode.Marker | ![]() |
Only markers are shown in the legend. |
LegendMarkerMode.MarkerAndCheckBox | ![]() |
Markers and check boxes are shown in the legend simultaneously (markers are positioned in front of check boxes). |
LegendMarkerMode.None | ![]() |
No check boxes or markers are shown in the legend. |
NOTE
For Chart Control for ASP.NET and ASP.NET MVC, to save the state of series', constant lines', strips' or indicators' legend check boxes on callbacks, set WebChartControl.SaveStateOnCallbacks (ChartControlSettings.SaveStateOnCallbacks) to true.
Examples
The example shows how to simultaneously display check boxes and markers in a legend.
To do this, set the Legend.MarkerMode property to the CheckBoxAndMarker (or MarkerAndCheckBox) mode. The LegendMarkerMode enumeration lists all the possible modes.
// Use the following line to display check boxes and markers for the default chart legend.
chartControl.Legend.MarkerMode = LegendMarkerMode.CheckBoxAndMarker;
// Use the following line to display check boxes and markers for an additional legend.
chartControl.Legends[legendIndex].MarkerMode = LegendMarkerMode.CheckBoxAndMarker;