Build vertical stacked bar chart

Looking to built a standard vertical stacked bar chart. Found the custom component MODEL and IFRAME CODE for a horizontal stacked bar chart using chart.js, but have been unable to modify to fit a vertical one. Any help is greatly appreciated!

Horizontal stacked bar chart: Build stacked bar chart and rotate x axis labels vertically

Hello!

If you’d like to continue using the linked example all you need to do is change the type value in Model Code from type: "horizontalBar" to type: "bar". Alternatively you can use the built-in stacked bar chart functionality in the Plotly Chart Component (which we just released in beta!).

Hope this helps! Let me know if you run into any issues.

  • Jane

Thanks! Tried that first, but must’ve needed to refresh. Follow up:

Is there a way to allow for multiple stacked bars per label point?

@jane tbc, is the stacked bar feature compatible with a multiple bar chart? Appreciate your help so far!

Hi all! As part of our efforts to curate old community topics, I'd like to update this thread with the current way to make a vertical stacked bar chart.

Luckily it is as easy as just using our built-in stacked bar chart component! The orientation will be vertical by default.