Back to Devexpress

PieChartSegmentDirection Enum

blazor-devexpress-dot-blazor-90b8f0ff.md

latest2.1 KB
Original Source

PieChartSegmentDirection Enum

Lists values that specify how the chart arranges series slices.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public enum PieChartSegmentDirection

Members

NameDescription
Clockwise

Arranges series slices clockwise.

| | CounterClockwise |

Arranges series slices counterclockwise.

|

The following properties accept/return PieChartSegmentDirection values:

Remarks

Use the SegmentDirection property to arrange series slices clockwise or counterclockwise.

The following code snippet changes the slice direction from Clockwise to CounterClockwise:

razor
<DxPieChart Data="@SalesData"
            SegmentDirection="PieChartSegmentDirection.CounterClockwise"
            T="SaleInfo">
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.Region"
                      SummaryMethod="Enumerable.Sum">
        <DxChartSeriesLabel Visible="showLabels"
                            Position="labelPosition"
                            ValueFormat="ChartElementFormat.Thousands(1)">
            <DxChartSeriesLabelConnector Visible="true" />
        </DxChartSeriesLabel>
    </DxPieChartSeries>
    @* ... *@
</DxPieChart>

@code {
    IEnumerable<SaleInfo> SalesData;
    bool showLabels = true;
    RelativePosition labelPosition = RelativePosition.Outside;

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

See Also

DevExpress.Blazor Namespace