dashboards package#
Submodules#
dashboards.plot_stocks module#
Dashboard to plot a stock of your choice, showing its candlestick plot.
- dashboards.plot_stocks.update_candlestick(value: str) Figure [source]#
Update the candlestick plot.
- Parameters:
value (str) â The name of the stock you want to display the candlestick plot.
- Returns:
A Plotly figure representing the candlestick plot.
- Return type:
plotly.graph_objs.Figure
Example
To update the candlestick plot for a stock with the symbol âAAPLâ, you can call the function like this:
>>> update_candlestick("AAPL")
- dashboards.plot_stocks.update_line_plot(value: str) Figure [source]#
Update the line plot.
- Parameters:
value (str) â The name of the stock you want to display the candlestick plot.
- Returns:
A Plotly figure representing the line plot.
- Return type:
plotly.graph_objs.Figure
Example
To update the line plot for a stock with the symbol âAAPLâ, you can call the function like this:
>>> update_line_plot("AAPL")
dashboards.utils module#
Helper functions common to all dashboards.
- dashboards.utils.matplotlib_init_for_dash() None [source]#
Run this before using Matplotlib with Dash.
- It fixes a crash:
âStarting a Matplotlib GUI outside of the main thread will likely failâ
- See this:
- dashboards.utils.plt_dash() str [source]#
Helper function to plot Matplotlib graphs in Dash dashboards.
Example
>>> plt.scatter([1, 2, 3], [2, 4, 6]) # your plot >>> plt.title("Title of the plot") # you can add anything on it >>> data = plt_dash()
And then, your Dash function should return the data variable.