Black Lives Matter. Please consider donating to Black Girls Code today.

Text styling in Bar Chart with Direct Labels

I’m trying to build a Bar Chart with Direct Labels ( The chart is ok, but I’d like to change the color of the direct labels to white in order to increase the contrast between marker color and text color. I cannot find the correct syntax to do it. Can anybody help?

You can simply set bar textfont.color to white:

archmoj, thanks for your fast response! I entered

textfont: {color: ‘rgb(255,255,255)’}

in my trace, but unfortunately, it has no effect. Do I something wrong?

Here is a demo.

archmoj, thank you so much. Now, it works, there must habe been a deeply hidden mistake in my code that was repaired when copy/pasted your code. Thanks again!