Back to Devexpress

IChartSeriesPoint.Symbol Property

blazor-devexpress-dot-blazor-dot-ichartseriespoint.md

latest2.9 KB
Original Source

IChartSeriesPoint.Symbol Property

Specifies a series point’s symbol.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(ChartPointSymbol.Circle)]
ChartPointSymbol Symbol { get; set; }

Property Value

TypeDefaultDescription
ChartPointSymbolCircle

An enumeration value.

|

Available values:

NameDescription
Circle

Displays point markers as circles.

| | Square |

Displays point markers as squares.

| | Polygon |

Displays point markers as polygons.

| | TriangleDown |

Displays point markers as inverted triangles.

| | TriangleUp |

Displays point markers as triangles.

| | Cross |

Displays point markers as crosses.

|

Remarks

A Chart point’s symbol is specified by the Symbol property. You can override this value for individual points. For this purpose, handle the CustomizeSeriesPoint event and use the PointAppearance.Symbol property to set the new symbol.

The following code snippet demonstrates how to:

razor
<DxChart Data="@WeatherForecasts" CustomizeSeriesPoint="@PreparePointSymbol">
    <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>
</DxChart>

@code {
    WeatherForecast[] WeatherForecasts;
    ...
    protected void PreparePointSymbol(ChartSeriesPointCustomizationSettings pointSettings) {
        double value = (double)pointSettings.Point.Value;
        if (value > 75)
            pointSettings.PointAppearance.Symbol = ChartPointSymbol.Cross;
    }
}

Run Demo: Charts - Series Point Customization

See Also

IChartSeriesPoint Interface

IChartSeriesPoint Members

DevExpress.Blazor Namespace