✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Bar chart not visible, completely grayed out

the bar chart is not visible,its completely greyed out.also the y axis categories are also not visible.the code is below. please let me know how can I fix this.


Hi @chaitu welcome to the forum! It is possible to have categorical data for the y axis of bars, as in my example below but it is usually not recommended since the height of the bar does not mean anything. You could instead have bars of constant height and different colors, and represent the categorical information as text within the bar.

import plotly.express as px
fig = px.bar(x=['Monday', 'Tuesday', 'Wednesday'], y=['not much', 'more', 'a lot'])