Data Label Dynamic Coloring

I have 2 bar charts on 2 separate analyses. The 2nd analysis was created by duplicating the first analysis and changing the data source. But somewhere along the way, the data labels on the 2nd analysis started to look different than the 1st despite no manual changes. The data labels on the original chart are dynamically colored based on the background color of what’s behind them (light-colored bar = dark-colored data label and vice versa). But the data labels on the 2nd chart don’t do this. When I try to change the color of the data labels, I can only change all the data labels to be the same color, of course, which doesn’t work with my bars’ color scheme.

Both charts’ data label formatting looks identical with the data label color “reset to default”.

2nd chart:

Hi @reaganl ,

This is indeed interesting behavior. Theme’s typically drive the coloring and look/feel of dashboards, but duplicating the analysis should mean the same theme is applied and you should still have that auto-contrast with the data labels. I checked the underlying JSON of both analysis and theme, and do not see any options for an auto-contrast option on data labels.

I would recommend in your 2nd analysis to re-apply the original theme and see if that helps. You can also try “Importing” the working visual into your 2nd analysis instead of doing an analysis duplication.

I also noticed in your second visual that the very first bar doesn’t contain another grouping in it. I’m wondering if this may be causing the issue. Can you try replacing the color/group so that all bars have a stacked column and see if that is the reason?

Hi @andyxson!

Thank you for your reply. You were exactly right in your last paragraph! Once I limited the data to remove that leftmost bar, the auto-contrast came back. I’m not sure why that quirk just took effect in the past week or so since I’ve always shown this same group of data and only encountered the issue recently. Oh well.

Thanks again!