I have a horizontal bar chart with a dynamic number of bars, could be anything from 10 to 300. Rather than force the user to zoom and move, I’d like the graph to grow in height along the number of bars. The default is 450px I think, and the bars seem to scale to fit in there.
I tried style={‘height’:'auto} on the dcc.Graph but it didn’t do anything. I guess it’s not that simple because if the bars are already auto width/height according to parent container size then that one must be absolute.
As a Python developer who’s new at Dash my second guess would be to pass a variable of len(df.index) multiplied by an arbitrary number of pixels for each bar and add guesstimate for margins, axis, text, title… I don’t like it.
How do I achieve this best?