blazor-devexpress-dot-blazor-72d28721.md
Defines a point’s appearance settings.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public interface IChartSeriesPoint
The following members return IChartSeriesPoint objects:
Use the PointAppearance property in a CustomizeSeriesPoint event handler to access and modify the following point settings:
ColorSpecifies the point’s color.ImageSpecifies the point’s image.SizeSpecifies the diameter of series points in pixels.SymbolSpecifies a series point’s symbol.VisibleSpecifies a series point’s visibility.
The following code snippet demonstrates how to:
<DxChart Data="@WeatherForecasts" CustomizeSeriesPoint="@PreparePointColor">
<DxChartLineSeries SummaryMethod="@(i => (int)i.Average())"
Color="System.Drawing.Color.Gray"
ValueField="@((WeatherForecast i) => i.TemperatureF)"
ArgumentField="@(i => i.Date.Date)"
Name="Temperature, F">
<DxChartSeriesPoint Symbol="ChartPointSymbol.Polygon"
Color="System.Drawing.Color.Gray" Size="25" />
</DxChartLineSeries>
<DxChartLegend Position="RelativePosition.Outside" />
</DxChart>
@code {
WeatherForecast[] WeatherForecasts;
...
protected void PreparePointColor(ChartSeriesPointCustomizationSettings pointSettings) {
double value = (double)pointSettings.Point.Value;
if(value > 75)
pointSettings.PointAppearance.Color = System.Drawing.Color.Red;
else if(value < 25)
pointSettings.PointAppearance.Color = System.Drawing.Color.Blue;
}
}
Run Demo: Charts - Series Point Customization
See Also