CustomDrawSeriesEventArgsBase.LegendTextColor Property

Gets or sets the text color of the legend item of the series or series point that is currently being painted.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.2.dll

Declaration

public Color LegendTextColor { get; set; }
Public Property LegendTextColor As Color

Property Value

Type Description
Color

The legend text color.

Examples

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;
    }
}

Implements

DevExpress.XtraCharts.Native.ILegendItemOptions.LegendTextColor
See Also