hi all,
i have the above data, i then use the follwing code:
> import plotly.graph_objs as go
> df = df.melt(id_vars=["year", "risk"], value_vars=["predicted", "actual"])
> fig = go.Figure()
>
> for risk in ["low", "medium", "high"]:
> tmp_df = df.query(f"risk == '{risk}'")
> fig.add_trace(
> go.Bar(
> x=[tmp_df["year"], tmp_df["variable"]], y=tmp_df["value"], name=risk,
> )
> )
>
> fig.update_layout(barmode="stack", height=400, width=800, margin=dict(b=60, t=20, l=20, r=20))
> fig.show()
i get the following graph:
how do i remove these horizontal lines, i have tried using opacity but does not work. when i hover over the chart i have noticed that the opacity is related to the value for that row , e.g. the lighhter the colour the lower the value⦠however i do not want this i just want it as one block. so where you see the different shades of red i want that as just one shade.