corelibraries-devexpress-dot-xtracharts-dot-seriespoint-47b7e040.md
Gets or sets the color used to draw this point.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public Color Color { get; set; }
Public Property Color As Color
| Type | Description |
|---|---|
| Color |
A Color object.
|
You can also use series point colorizers to paint series points.
The following example shows how to paint all the points with values less than 80 with the Red color:
chartControl1.BoundDataChanged += OnChartBoundDataChanged;
// ...
private void OnChartBoundDataChanged(object sender, EventArgs e) {
foreach (SeriesPoint seriesPoint in chartControl1.Series[0].Points) {
if (seriesPoint.Values[0] <= 80) {
seriesPoint.Color = Color.Red;
}
}
}
chartControl1.BoundDataChanged += OnChartBoundDataChanged
' ...
Private Sub OnChartBoundDataChanged(ByVal sender As Object, ByVal e As EventArgs)
For Each seriesPoint As SeriesPoint In chartControl1.Series(0).Points
If seriesPoint.Values(0) <= 80 Then
seriesPoint.Color = Color.Red
End If
Next
End Sub
See Also