Back to Devexpress

DxChartCommonSeries<T, TGroup, TValue, TArgument>.SeriesType Property

blazor-devexpress-dot-blazor-dot-dxchartcommonseries-4-088f66ee.md

latest4.9 KB
Original Source

DxChartCommonSeries<T, TGroup, TValue, TArgument>.SeriesType Property

Specifies the series type for XY series.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public ChartSeriesType SeriesType { get; set; }

Property Value

TypeDescription
ChartSeriesType

An enumeration value.

|

Available values:

Show 18 items

NameDescription
Area

Displays data as a polyline that connects the series values. The area between the polyline and the argument axis is shaded with a color.

| | Bar |

Displays data as a collection of rectangular bars.

| | FullStackedArea |

Displays the percentage value of multiple area series for each argument.

| | FullStackedBar |

Displays the percentage value of multiple bar series for each argument.

| | FullStackedLine |

Displays the percentage value of multiple line series for each argument.

| | FullStackedSpline |

Displays the percentage value of multiple spline series for each argument.

| | FullStackedSplineArea |

Displays the percentage value of multiple spline area series for each argument.

| | Line |

Displays data as points joined by line segments.

| | Scatter |

Displays data as a collection of points.

| | Spline |

Displays data as points joined by a spline interpolation.

| | SplineArea |

Displays data as a spline interpolation of the series values. The area between the spline and the argument axis is shaded with a color.

| | StackedArea |

Displays data as a polyline that connects the series values. The area between the polyline and the argument axis (or a lower series) is shaded with a color. Different series do not overlap because their values are stacked.

| | StackedBar |

Displays data as a collection of rectangular bars. Values of different series are stacked in multiple-series bars.

| | StackedLine |

Displays data as points joined by line segments. Different series do not overlap because their values are stacked.

| | StackedSpline |

Displays data as points joined by a spline interpolation. Different series do not overlap because their values are stacked.

| | StackedSplineArea |

Displays data as a spline interpolation of the series values. The area between the spline and the argument axis (or a lower series) is shaded with a color. Different series do not overlap because their values are stacked.

| | StepArea |

Displays data as a polyline that connects the series values by horizontal and vertical line segments. The area between the polyline and the argument axis is shaded with a color.

| | StepLine |

Displays data as points joined by horizontal and vertical line segments, looking like steps.

|

Remarks

Use the SeriesType property to create a common XY series (for example, line, bar, or area).

To generate series that require specific settings in addition to ArgumentField and ValueField (for example, bubble or stock series), use the SeriesTemplate property.

Example

The following code snippet uses a drop-down menu to change the series type dynamically:

razor
<label><b>Series Type:</b></label>
<DxComboBox Data="Enum.GetValues<ChartSeriesType>()"
            @bind-Value="@CurrentSeriesType" />

<DxChart Data="@SalesData">
    <DxChartTitle Text="Sales amount, $" />
    <DxChartCommonSeries SummaryMethod="Enumerable.Sum"
                         NameField="@((SaleInfo s) => s.Date.Year)"
                         ArgumentField="@((SaleInfo s) => s.City)"
                         ValueField="@((SaleInfo s) => s.Amount)"
                         SeriesType="@CurrentSeriesType">
    </DxChartCommonSeries>
    @* ... *@
</DxChart>

@code {
    ChartSeriesType CurrentSeriesType = ChartSeriesType.Line;

    IEnumerable<SaleInfo> SalesData;
    protected override async Task OnInitializedAsync() {
        SalesData = await Sales.GetSalesAsync();
    }
}

See Also

DxChartCommonSeries<T, TGroup, TValue, TArgument> Class

DxChartCommonSeries<T, TGroup, TValue, TArgument> Members

DevExpress.Blazor Namespace