Open-source dashboard template for plotly graphs, forked from the keen.io dashboard templates.
-
Unzip the file and open index.html in a text editor
-
Find the lines containing the text "iframe" and replace the URL with your plotly graph URL. Don't forget to add the ".embed" (More about embedding plotly graphs with iframes)
-
Save index.html and double-click to open it in your browser.
You can add JavaScript controls to any Plotly graph iframe with plotly's postMessage API.
See examples of adding a moving average, custom buttons, and zoom callbacks.
To run postMessage examples locally on your desktop, you have to open index.html with a WebServer:
-
Open your terminal and naviate to the dashboard folder where index.html is.
-
Start SimpleHTTPServer
python -m SimpleHTTPServer 8000
-
Navigate to http://localhost:8000/ in your browser. You should see the dashboard from index.html.