How can I make a bar graph's color be based on a value of a column and pull those colors from a palette?For the following example, I would like to know how to base the colors off of the Category column. I would not know how many Categories ahead of time.
fig = go.Figure()
# create a bar graph with colors being different based on category
fig.add_trace(go.Bar(
x=challenge_count_df["Challenge"],
y=challenge_count_df["Count"],
marker_color=challenge_count_df["Category"]
)
)
If you could give me any help in figuring out how to maybe map the marker color based on the values of the Category column with colors from a palette, I'd greatly appreciate it.