We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

Blazor 100% Stacked Bar Chart displays multiple series of data as stacked bars, ensuring that the cumulative proportion of each stacked element always totals 100%. Hence, the y-axis will always be rendered with the range 0–100.


Multi series

Allows you to plot multiple series in a single chart to compare different data sets. Enabling legend and tooltip gives more information about the individual series.


Marker

Marks data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, pluses, crosses, and pentagons. In addition to these shapes, use images to make the point more attractive.


Data label

Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.


Multiple axes

Use multiple axes to plot different data sets that widely vary from one other.


Stacking group

Allows grouping a series with another series separately using a different group name.

Stacking group documentation


Spacing and width

The Blazor 100% Stacked Bar Chart provides an option to customize the spacing between two bars and width of the bar.


Rounded corners

Modernize the UI by applying rounded corners to the 100% stacked bar


Customization

Customize the look and feel of the Blazor 100% Stacked Bar Chart using built-in APIs.

Customization documentation


Blazor 100% Stacked Bar Chart Code Example

Easily get started with Blazor 100% Stacked Bar Chart using a few simple lines of C# code, as demonstrated below. Also explore our Blazor 100% Stacked Bar Chart Example that shows you how to render and configure the chart.

@using Syncfusion.Blazor.Charts

<SfChart>
    <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category"/>
    <ChartSeriesCollection>
        <ChartSeries DataSource="@MedalDetails" XName="X" YName="YValue" StackingGroup="a" Type="ChartSeriesType.StackingBar100"/>
        <ChartSeries DataSource="@MedalDetails" XName="X" YName="YValue1" StackingGroup="b" Type="ChartSeriesType.StackingBar100"/>
    </ChartSeriesCollection>
</SfChart>

@code
{
    public class ChartData
    {
        public string X { get; set; }
        public double YValue { get; set; }
        public double YValue1 { get; set; }
    }
    public List<ChartData> MedalDetails = new List<ChartData>
    {
        new ChartData { X= "USA", YValue= 46, YValue1=56 },
        new ChartData { X= "GBR", YValue= 27, YValue1=17 },
        new ChartData { X= "CHN", YValue= 26, YValue1=36 },
        new ChartData { X= "UK", YValue= 56,  YValue1=16 },
        new ChartData { X= "AUS", YValue= 12, YValue1=46 },
        new ChartData { X= "IND", YValue= 26, YValue1=16 },
        new ChartData { X= "DEN", YValue= 26, YValue1=12 },
        new ChartData { X= "MEX", YValue= 34, YValue1=32},
    };
}

Not sure how to create your first Blazor 100% Stacked Bar Chart? Our documentation can help.


Blazor Components – 85+ UI and DataViz Components

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon