DxPieChartSeries<T, TArgument, TValue> Class
Defines a pie or donut series.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxPieChartSeries<T, TArgument, TValue> :
DxComplexSettingsComponent<DxPieChartSeries<T, TArgument, TValue>, IPieChartSeriesModel>,
IModelProvider<ChartSeriesLabelModel>,
IModelProvider<ChartSeriesLegendItemModel>,
IPieChartSeries,
IChartSeriesBase
Type Parameters
Name | Description |
---|---|
T | The type of data. |
TArgument | The type of arguments. |
TValue | The type of values. |
Remarks
The following image demonstrates a pie chart sample:
Use the Pie Chart’s Data property to specify an IEnumerable<T> data source. The chart should contain at least one series to display data. Use the following series properties to bind the data source fields to the series:
- ArgumentField: specifies the data source field that contains arguments for chart points.
- ValueField: specifies the data source field that contain values for chart points.
For a sample data source, refer to our GitHub repository.
<DxPieChart Data="@SalesData">
<DxChartTitle Text="Total Sales" />
<DxChartLegend VerticalAlignment="VerticalEdge.Bottom" Position="RelativePosition.Outside" />
<DxPieChartSeries ValueField="@((SaleInfo i) => i.Amount)"
ArgumentField="@(i => i.City)"
SummaryMethod="Enumerable.Sum">
<DxChartSeriesLabel Visible="true" />
</DxPieChartSeries>
</DxPieChart>
@code {
IEnumerable<SaleInfo> SalesData;
protected override async Task OnInitializedAsync() {
SalesData = (await Sales.GetSalesAsync()).Where(x => x.Country == "United States");
}
}
Inheritance
Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.Internal.IPieChartSeriesModel>
DxComplexSettingsComponent<DxPieChartSeries<T, TArgument, TValue>, DevExpress.Blazor.Internal.IPieChartSeriesModel>
DxPieChartSeries<T, TArgument, TValue>
See Also