Skip to main content
All docs
V24.1

DxPolarChartStackedBarSeries<T, TArgument, TValue>.Stack Property

Specifies the stack in a side-by-side stacked series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue("default")]
[Parameter]
public string Stack { get; set; }

Property Value

Type Default Description
String "default"

The stack identifier.

Remarks

This property is applicable only to DxPolarChartStackedBarSeries.

If you do not specify the Stack property, the Polar Chart displays one stack for each argument. The following image shows a stack for one argument value:

Ragular stacked bars

You can specify the Stack property to display side-by-side stacked charts. For example, the following image shows the Polar Chart with the same argument as the image above, except the series are divided into two stacks.

Side-by-Side Stacked Bar

Side-by-side display enhances chart readability and allows users to compare stacks displayed next to each other. The number of stacks is unlimited.

The following code snippet creates a side-by-side chart as in the image above.

<DxPolarChart T="StackedBarPoint" Data=@Data>
    <DxChartLegend Visible="false" />
    <DxChartAnimationSettings Enabled="false" />
    <DxPolarChartValueAxis></DxPolarChartValueAxis>
    <DxPolarChartStackedBarSeries Stack="male"
                                  ArgumentField="@((StackedBarPoint i) => i.State)"
                                  ValueField="@((StackedBarPoint i) => i.MaleMiddle)">
    </DxPolarChartStackedBarSeries>
    <DxPolarChartStackedBarSeries Stack="male"
                                  ArgumentField="@((StackedBarPoint i) => i.State)"
                                  ValueField="@((StackedBarPoint i) => i.MaleOlder)">
    </DxPolarChartStackedBarSeries>
    <DxPolarChartStackedBarSeries Stack="female"
                                  ArgumentField="@((StackedBarPoint i) => i.State)"
                                  ValueField="@((StackedBarPoint i) => i.FemaleMiddle)">
    </DxPolarChartStackedBarSeries>
    <DxPolarChartStackedBarSeries Stack="female"
                                  ArgumentField="@((StackedBarPoint i) => i.State)"
                                  ValueField="@((StackedBarPoint i) => i.FemaleOlder)">
    </DxPolarChartStackedBarSeries>

</DxPolarChart>

@code {
    public class StackedBarPoint {
        public string State { get; set; }
        public double MaleMiddle { get; set; }
        public double MaleOlder { get; set; }
        public double FemaleMiddle { get; set; }
        public double FemaleOlder { get; set; }
    }

    public List<StackedBarPoint> Data { get; set; }

    protected override void OnInitialized()
    {
        Data = new List<StackedBarPoint>() {
            new StackedBarPoint() {
                State = "USA",
                MaleMiddle = 90.354,
                MaleOlder = 14.472,
                FemaleMiddle = 91.827,
                FemaleOlder = 20.362
            }
        };
    }
}
See Also