Closed charlesons closed 1 year ago
The implementation outlined in https://dkane.net/2020/better-horizontal-bar-charts-with-plotly/ uses Plotly Express (Python) and the useful helper functions for creating subplots are not available in Plotly.Js.
Some relevant resources for implementing the same thing in Plotly.JS are here:
https://stackoverflow.com/questions/51592730/how-to-add-title-to-each-subplot-in-plotly-js
https://github.com/plotly/plotly.js/issues/2746#issuecomment-810195118
For horizontal bar charts with long category labels the labels themselves tend to take up most of the available chart space as shown below:
A solution is to create sub-plots within the main plot for each bar:
https://dkane.net/2020/better-horizontal-bar-charts-with-plotly/