Example of 100% Stacked Bar in Javascript Chart Control

/
/
100% Stacked Bar

This TypeScript 100% stacked bar chart example visualizes the comparison of renewable energy generation in China from 2020 to 2023, segmented by wind, solar, and hydro sources, using a default 100% stacked bar series. The legend provides additional information about the series.

More Details...

Description

In this example, you can see how to render and configure the 100% stacked bar chart. The 100% stacked bar chart displays multiple series of data as stacked bars, ensuring that the cumulative value of each stacked element always totals 100%. Tooltips are enabled in this example. To see the tooltip in action, hover over a point or tap on a point in touch-enabled devices. Injecting Module Chart component features are segregated into individual feature-wise modules. To use 100% stacking bar series, we need to inject StackingBarSeries module using Chart.Inject(StackingBarSeries) method. More information on the 100% stacked bar series can be found in this documentation section.