Skip to main content

DxPieChart<T>.InnerDiameter Property

Specifies a value used to calculate the Pie Chart’s inner diameter.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(0)]
[Parameter]
public double InnerDiameter { get; set; }

Property Value

Type Default Description
Double 0

The ratio of the Pie Chart’s inner diameter to the outer diameter.

Remarks

Use the InnerDiameter property to change the chart’s shape to Donut. The InnerDiameter is a value from 0 to 1 that is the ratio of the inner diameter to the outer diameter (Diameter).

The following code creates a donut with an outer diameter of 0.7 * 300 = 210 pixels, and inner diameter of 210 * 0.5 = 105 pixels.

Donut Diameter and Radius

<DxPieChart Data="@SalesData"
            Diameter="0.7"
            InnerDiameter="0.5"
            Height="300"
            Width="950">
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.Region"
                      SummaryMethod="Enumerable.Sum">
    </DxPieChartSeries>
    <DxChartLegend Visible="false" />
</DxPieChart>

Run Demo: Pie Chart

See Also