What Changed
In previous versions, you can create pie and donut series in the DxChart component:
Razor<DxChart Data="@SalesData">
<DxChartPieSeries ValueField="@((SaleInfo i) => i.Amount)"
ArgumentField="@(i => i.City)"
SummaryMethod="Enumerable.Sum">`
</DxChartPieSeries>
</DxChart>
In v. 21.2, we marked the DxChartPieSeries and DxChartDonutSeries as obsolete. Use the DxPieChart component and DxPieChartSeries instead.
Reasons for Change
We split the DxChart component into two: DxChart for series that are plotted on the Cartesian plane, and DxPieChart for pie and donut charts. The new component contains properties related only to pie charts. This change improves API clarity.
Impact on Existing Apps
This change affects your application if your DxChart component contains pie and donut series.
How to Upgrade Existing Apps
We retained backward compatibility. However, we do not recommend that you use the previous approach and its support is not guaranteed in further versions.
Follow the steps below to upgrade your project:
- Replace
DxChart
withDxPieChart
. - Replace
DxChartPieSeries
andDxChartDonutSeries
withDxPieChartSeries
. - Specify the InnerDiameter property if your chart contains donut series.
The example below shows the upgraded markup:
Razor<DxPieChart Data="@SalesData" InnerDiameter="0.3">
<DxPieChartSeries ValueField="@((SaleInfo i) => i.Amount)"
ArgumentField="@(i => i.City)"
SummaryMethod="Enumerable.Sum">
</DxPieChartSeries>
</DxPieChart>