import dash
from dash import dcc, html
import plotly.express as px
import plotly.io as pio
import vizro
import plotly.graph_objects as go
new_bits = go.layout.Template(data=go.layout.template.Data(
#bar=[go.Bar(marker_pattern_shape="/")],
#histogram=[go.Histogram(marker_pattern_shape="/")]
histogram=[go.Histogram(fillcolor=0.8)]
))
template = pio.templates.merge_templates("vizro_light", new_bits)
print(template.data)
df = px.data.iris()
fig1 = px.scatter(
df,
x="sepal_length",
y="petal_length",
color="species",
title="Line Chart: Petal vs Sepal Length",
template=template,
)
fig2 = px.histogram(
df,
x="species",
y="petal_width",
color="species",
template=template
)
print(fig2)
# dash app
app = dash.Dash(__name__)
app.layout = [
dcc.Graph(figure=fig1),
dcc.Graph(figure=fig2)
]
if __name__ == "__main__":
app.run_server(debug=True)