Dash is an open-sourced Python Dashboard package from plot.ly. It's pretty easy to use and has a lot of components to build beautiful and informative graphs and charts.
Install Packages
Demo Dash Script
Create a Python file graph.py
with following code:
Local Development
Run python graph.py
to initiate local development preview on http://localhost:8050. This will enable hot reload to every changes saved will cause the page to be refreshed.
Initiate Gunicorn
We can use Gunicorn to deploy the dashboard in production environment. Run the following command within the same folder with graph.py
Then visit http://127.0.0.1:8000 (or server IP:8000 from remote) to view the dashboard.
Customize CSS
It's fairly simple to cutomize Dash with other CSS frameworks or customize your own CSS.
Modify the header part of your python file as follows:
Then create a folder assets
under the root of your dash application, put all your CSS and JavaScript files into this folder. So Dash will automatically render the page based on these files when starting the app.