I have created a bar chart that has the values of each of the columns at the end of each bar. The color of the bars is the same as the text of the values. The problem is that based on the width of the container/browser by default the values move inside the bar. But then you can't read the text as the bar and text are the same. I would prefer to have the values outside the bar but when they have to move inside the bar due to space is there a way to change the font color to white so that it is readable? Here is an example of the chart.
Unfortunately, there's no possibility to detect if the label was moved inside the bar or not. But you can enable label background to increase its readability like in the sample. Pay attention to lines 96-97. All available background settings you can find in the list.