Stacked bar reusing colors

When creating a stacked bar chart using a bootstrap theme (minty), the bar chart reuses colors. When I create a pie chart with the same data and theme, it does not reuse colors. I have seen other posts that show how to specify color, but I’d really prefer not to. I just don’t want colors repeated if possible. Both charts:

Relevant code:

    bar_chart = px.bar(df, x=granularity, y="Sales", color="Product", barmode="stack", template="minty")
    pie_chart = px.pie(df, values='Sales', names='Product', title='Sales by Product', template="minty")
    pie_chart.update_layout(showlegend = False)

    return html.Div([
            html.Div(dcc.Graph(figure = bar_chart), className='col-lg-8'),
            html.Div(dcc.Graph(figure = pie_chart), className='col-lg-4')
        ], className='row')

Is there a way to get the stacked bar chart to use the rest of the colors in the theme?

@schwaaamp, welcome to the forums.

This actually looks like it could be something caused by your data. Hard to tell without an reproducible example :slight_smile:

How many colors does the minty theme have?