Overview
The React 100% Stacked Bar Chart displays multiple data series as stacked bars, where each stack is normalized to 100% to show the relative contribution of each series. The value axis always ranges from 0 to 100, making it suitable for percentage-based comparisons.
Multiple series
Multiple series can be plotted in a single chart to compare different datasets. Legends and tooltips provide additional information about individual series.
Marker
Markers support built-in shapes such as circles, rectangles, ellipses, lines, diamonds, triangles, pentagons, crosses, and pluses. Images can also be used as marker symbols for customized presentations.
Data label
Data labels display information about data points. Templates support custom label content using HTML elements such as images, divs, and spans. Labels can also be rotated to a specified angle.
Multiple axes
Multiple axes support visualization of datasets with significantly different value ranges.
Stacking group
Series can be grouped separately by assigning different stacking group names.
Spacing and width
Spacing between bars and bar width can be customized to control chart appearance and layout.
Rounded corners
Rounded corners can be applied to improve the visual appearance of bar segments.
100% Cylindrical Stacked Bar
Values can be displayed using cylindrical bar segments for an alternative visual style.
Customization
Built-in APIs provide extensive options for customizing chart appearance and behavior.
Code snippet
Get started with the React 100% Stacked Bar Chart using the HTML and JavaScript example below. Also explore the demo to learn how to render and configure the chart.
import { AxisModel, Category, ChartComponent, Inject, SeriesCollectionDirective, SeriesDirective, StackingBarSeries} from'@syncfusion/ej2-react-charts';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
class App extends React.Component<{}, {}> {
public primaryXAxis: AxisModel = { valueType: 'Category'};
public data1 : any[]= [
{ x: '2014', y: 111.1 },
{ x: '2015', y: 127.3 },
{ x: '2016', y: 143.4 },
{ x: '2017', y: 159.9 }];
public data2 : any[]= [
{ x: '2014', y: 76.9 },
{ x: '2015', y: 99.5 },
{ x: '2016', y: 121.7 },
{ x: '2017', y: 142.5 }];
public render() {
return <ChartComponent id='charts' primaryXAxis={this.primaryXAxis}>
<Inject services={[StackingBarSeries, Category]} />
<SeriesCollectionDirective>
<SeriesDirective dataSource={this.data1} xName='x' yName='y' type='StackingBar100'/>
<SeriesDirective dataSource={this.data2} xName='x' yName='y' type='StackingBar100'/>
</SeriesCollectionDirective>
</ChartComponent>
}
};
ReactDOM.render(
<App />,
document.getElementById('charts') as HTMLElement
);<!DOCTYPE html>
<html>
<body>
<div id="charts"></div>
</body>
</html>Learning resources

100% Stacked Bar Chart User Guide
Learn the available options to customize the React 100% Stacked Bar Chart.
Explore all Syncfusion React components
Explore over 140+ React UI components featuring established, and production-ready controls built for modern web app development.
- SMART COMPONENTSDATA VISUALIZATIONDROPDOWNSFILE VIEWERS & EDITORSBUTTONSINTERACTIVE CHATINPUTSNAVIGATIONNOTIFICATIONS
