# How to show all data on graph

**URL:** <https://community.plotly.com/t/how-to-show-all-data-on-graph/70811>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [December 13, 2022, 2:42pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811 "2022-12-13T14:42:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aire](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Aire](https://community.plotly.com/u/Aire)\
**Post date:** [December 13, 2022, 2:42pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811/1 "2022-12-13T14:42:41Z")

</div>

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](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/d/c/dc424ab71e60639028e9431ee11d1a0e92b06813.jpeg)

It looks fine. You can think all data is there  
Now, if you enlarge it you see that’s not true:  
 ![2Captura](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/b/b/bbe3040fc337c40d0907e43890572ab9a500a3ab.jpeg)

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:

```auto
            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.

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 13, 2022, 2:53pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811/2 "2022-12-13T14:53:47Z")

</div>

HI @Aire,

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

---

<div class="post-metadata">

**Author:** ![Aire](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Aire](https://community.plotly.com/u/Aire)\
**Post date:** [December 13, 2022, 3:14pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811/3 "2022-12-13T15:14:15Z")

</div>

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

Thank you.

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 13, 2022, 3:24pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811/4 "2022-12-13T15:24:26Z")

</div>

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

MRE:

> [@How to write a Minimal Reproducible Example (MRE)](https://community.plotly.com/t/how-to-write-a-minimal-reproducible-example-mre/61502):
>
> Adding a minimal reproducible example to your questions will help attract community members to answer your question. The goal of writing a MRE is to allow other members of the community to run the code on their computers and “reproduce” the error, so that they can best help you. Please make sure that your MRE includes data and that the code is correctly pre-formatted. To preformat, copy and paste the code in your post and then click on \</\> (Preformatted text), as shown on the image:

---

<div class="post-metadata">

**Author:** ![Aire](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Aire](https://community.plotly.com/u/Aire)\
**Post date:** [December 13, 2022, 3:41pm UTC](https://community.plotly.com/t/how-to-show-all-data-on-graph/70811/5 "2022-12-13T15:41:49Z")

</div>

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.
