CustomDrawSeriesEventArgsBase.LegendTextVisible Property
Gets or sets the text visibility of the legend item of the series whose points are currently being drawn.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.1.dll
NuGet Package: DevExpress.Charts
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, to show the text; otherwise, false. |
Example
This example demonstrates how you can conditionally customize legend items in the ChartControl.CustomDrawSeriesPoint event handler.
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...
private void chartControl1_CustomDrawSeriesPoint(object sender,
CustomDrawSeriesPointEventArgs e) {
if (Convert.ToDouble(e.SeriesPoint.Values[0]) > 5) {
e.LegendText = "exceeded";
e.LegendTextColor = Color.Red;
}
else {
e.LegendMarkerVisible = false;
e.LegendTextVisible = false;
}
}
See Also