Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxChartSeries.Color Property

Specifies the series color.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public Color Color { get; set; }

#Property Value

Type Description
Color

The color.

#Remarks

Use the Color property to specify the series line color.

The following example shows possible ways to define the color:

Razor
<DxChart Data="@ChartsData">
    <DxChartLineSeries Name="2017" 
                       Filter="@((SaleInfo s) => s.Date.Year == 2017)" 
                       Color="Color.Red"
                       ArgumentField="@(s => s.City)" 
                       ValueField="@(s => s.Amount)" />
    <DxChartLineSeries Name="2019" 
                       Filter="@((SaleInfo s) => s.Date.Year == 2019)" 
                       Color="@(Color.FromArgb(0, 0, 255))"
                       ArgumentField="@(s => s.City)" 
                       ValueField="@(s => s.Amount)" />
    <DxChartLegend Position="RelativePosition.Outside" HorizontalAlignment="HorizontalAlignment.Right" />
</DxChart>

Run Demo: Charts - Overview

See Also