I am not able to change the order of y-axis values in horizontal bar chart
.
Code:
fig = px.bar(
dff_sub["city"].value_counts()[:10],
orientation="h",
title="Top 10 cities which are badly affected by Terrorism",
labels={"index": "Cities", "value": "Attack Counts "},
color=dff_sub["city"].value_counts()[:10],
color_continuous_scale=["#bdbdbd", "#969696", "#737373", "#525252",],
)
Chart looks like this:
I just want this thing in reverse order in graph. The higher value in top and lower in bottom.