I tried the DCC Loading component
and also tried the CSS
way of disabling the default "Loading.. " text on screen when component is in loading state. It is not working at all. Please suggest me a way to change the default loading message to a loader with CSS
in Plotly's Dash
.
This is the dashapp.py
file that will be loaded as login page:
from dash import Dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from config import appserver
import time
external_stylesheets = [dbc.themes.YETI,'./frontend/static/stylesheet.css']
dashapp = Dash(__name__, server = appserver,external_stylesheets=external_stylesheets,\
url_base_pathname='/application/', title='Home Page', assets_url_path='assets')
dashapp.css.config.serve_locally = True
dashapp.layout = html.Div([
html.H1('Hi Welcome to Dash-Flask integration app!'),
], id="child-process")
if __name__=='__main__':
dashapp.run_server(debug=True)
The CSS
stylesheet is present in directory: ./frontend/static/
.
I used the CSS
stylesheet for overwriting the default loading behaviour like this:
*[data-dash-is-loading="true"]{
visibility: hidden;
}
*[data-dash-is-loading="true"]::before{
content: "Loading...";
display: inline-block;
color: magenta;
visibility: visible;
}
By adding the below CSS file under
/assets/style.css
directory, issue was resolved for me.