Hello, I don’t really know how to formulate my problem so I’m making a post here, I’m trying to make sone plotly bar chart and I got this
I figure it had something to do with the layout property of the graph so I changed
template='plotly_dark'
to None and then I got this insteadIt’s so weird that the colos on the legend are fine but not the plot…
Also it doesn’t show on the pictures but on my app I can faintly see the colors, it’s like there is a big black or white filter on the bars, here’s what I really see
Any help would be appreciated, also my code is a mess but here it is
def new(plot_id: str, renderer: IDataStudyRenderer, source: View, *args,
**kwargs) -> Component:
x_col = kwargs.pop("x_col")
y_col = kwargs.pop("y_col", None)
color = kwargs.pop("color", None)
...
layout = kwargs.pop("layout", {})
fig = px.bar(
data_frame=data, x=x_col, y=y_col, color=color,
title="Graph with Column Selection"
)
layout.update(
xaxis={'title': x_col},
yaxis={'title': y_col},
# template='plotly_dark',
plot_bgcolor='rgba(0, 0, 0, 0)',
paper_bgcolor='rgba(0, 0, 0, 0)',
)
fig.update_layout(layout)
plot = html.Div(
className="plot",
children=[
html.Div(
children=IPlot.get_header(plot_id, plot_name)
),
dcc.Graph(id=f"{source.name}_{plot_id}_graph", figure=fig),
]
)
renderer.plots[plot_id] = plot
return plot