I have a simple Dash application and I would like to set fonts and colours of my plots via CSS. Here is what my app.py looks like:
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
def generate_plot():
fig = go.Figure()
fig.add_trace(go.Scatter(x=[1, 2, 3], y=[1, 2, 3]))
return fig
app = dash.Dash(__name__)
app.layout = html.Div(children=[
html.H1(children="title", className="title"),
dcc.Graph(figure=generate_plot(), class="plot")
])
I also have a file assets/style.css and i deally, I would like to extend this file with content that describes how my dcc.Graph objects should look. Is this possible? If it is, then how would I do it? I would like to be able to set fonts, background colours, line/marker colours, etc. Unfortunately, something like .plot { background-color: aqua; } in CSS has no effect. Also, html, body {font-family: serif; } has no effect too.