How to show all data on graph

Hello everybody!
First of all thank you, because you are a great help in using plotly.

Normally, if the generated plot is bigger than the container, plotly doesn’t show everything, you have to enlarge certain areas to see all the bars (for example).

Is there any way to control this better? The plot looks fine even though bars are missing, and you can perfectly well lose information if you don’t think of enlarging it.

The same happens when generating the image, information can be lost.

Example:
On a container you have this:
1Captura

It looks fine. You can think all data is there
Now, if you enlarge it you see that’s not true:
2Captura

How can I fix this, can I force it to show everything, or is there a way to predict the necessary size? Or something else?

I add an MRE:

            fig = go.Figure()

            fig.add_trace(go.Bar(
              x = [2, 3, 5, 6, 5, 4, 4, 1 , 1, 5, 3, 4, 3, 5],
              y = [['First', 'First','First', 'First','First', 'First','First', 'First', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second'],
                   ["A", "B", "C", "D","E", "F","G","H", "A", "B", "C", "D","E", "F"]],
              name = "Adults",
              orientation='h'
            ))

            fig.add_trace(go.Bar(
              x = [2, 3, 5, 6, 5, 4, 4, 1 , 1, 5, 3, 4, 3, 5],
              y = [['First', 'First','First', 'First','First', 'First','First', 'First', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second', 'Second'],
                   ["G", "H", "I", "J","K", "L","M","N", "G", "H", "J", "K","L", "M"]],
              name = "Children",
              orientation='h'
            ))    
            fig.update_layout(barmode='stack')              
            new_element = html.Div(
                style={'width': :'700px', 'height':'400px','display': 'inline-block', 'outline': 'thin lightgrey solid', 'padding': 10},
                children=[        
                        dcc.Graph(
                            id='example'
                            style={'height': 400},
                            figure=fig
                         )
]
            )

Thank you.

HI @Aire,

I think it’s not clear, what you are referring to. Could you add a MRE?

Sorry, I don’t know what MRE is. I’ll assume an example is ok…
I added an example on first message.

Thank you.

Hi, what do you mean by “container”? How do you generate these charts?

MRE:

Thank you for explanation. I’ll try to prepare one.

Container could be a div with fixed size inside a dashboard. Dinamically generated chart has to adjust to that div’s size.