# How to remove initial blank chart when loading

**URL:** <https://community.plotly.com/t/how-to-remove-initial-blank-chart-when-loading/46464>\
**Category:** Dash Python\
**Created:** [October 26, 2020, 2:36am UTC](https://community.plotly.com/t/how-to-remove-initial-blank-chart-when-loading/46464 "2020-10-26T02:36:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [May 11, 2023, 8:12am UTC](https://community.plotly.com/t/how-to-remove-initial-blank-chart-when-loading/46464/6 "2023-05-11T08:12:37Z")

</div>

If you don’t want the graph to take space in your layout, you can change from `hidden` to `none`

See also:

> **[W3Schools online HTML editor](https://www.w3schools.com/css/tryit.asp?filename=trycss_display)**
>
> The W3Schools online code editor allows you to edit code and view the result in your browser

In Dash you will have to change to:

` dcc.Graph(id='graph', style={'display': 'none'})`.

Full example:

```python
import dash
from dash import html, dcc, Input, Output
import plotly.express as px
import time

app = dash.Dash( __name__ , update_title=None)

app.layout = html.Div([
    dcc.Graph(id='graph', style={'display': 'none'}),
    html.Div(id='dummy')
])

@app.callback(
    Output('graph', 'figure'),
    Output('graph', 'style'),
    Input('dummy', 'style')
)
def show_image(_):
    time.sleep(3)
    return px.scatter(x=[1, 2, 3], y=[1, 2, 3]), {}
    # ^^^^ update style (visibility) of graph

if __name__ == " __main__":
    app.run_server(debug=True)

```

You could also specify the height for the empty graph:

```python
import dash
from dash import html, dcc
import plotly.graph_objects as go

app = dash.Dash( __name__ , update_title=None)

app.layout = html.Div([
    dcc.Graph(id='graph', figure=go.Figure(layout={'height': 400})),
    html.Div(id='dummy')
])

if __name__ == " __main__":
    app.run_server(debug=True)

```

---

_[View the full topic](https://community.plotly.com/t/how-to-remove-initial-blank-chart-when-loading/46464)._
