Boosted_d16
Boosted_d16

Reputation: 14112

Does Highchart.js not have 'stacked percentage bar' chart

I can see that Highcharts.js provides 'stacked percentage column' charts but I cant seem to find 'stacked percentage bar' charts. Am I missing something?

stacked percentage column = https://www.highcharts.com/demo/column-stacked-percent

stacked percentage bar = ?

Upvotes: 1

Views: 45

Answers (1)

Halvor Holsten Strand
Halvor Holsten Strand

Reputation: 20536

As specified under the Bar chart information page a bar chart is:

The bar chart is exactly the same as a column chart only the x-axis and y-axis are switched.

With that in mind, we can turn any column chart into a bar chart by switching the axis. This can be done using the inverted option (API).

For example (JSFiddle demo):

chart: {
    type: 'column',
    inverted: true
}

Upvotes: 1

Related Questions