I have a stacked bar chart and one of the bars in the chart shows the value. I am using Labeled to put the value where I need it, but I can't seem to figure out how to change the color of the text. I have tried using Style wrapped around the text, using LabelStyle->White within Labeled, and using LabelStyle with Directive, but nothing seems to affect the color of my text, which is hard to see on the blue bar. Here's my code:
myPercentPrecision[x_] :=
SetPrecision[Interpreter["PercentFraction"][x], 4]
BarChart[{{Labeled[myPercentPrecision[.5833],
myPercentPrecision[.5833], Center, Bold, 18],
myPercentPrecision[1 - .5833]}, {Labeled[myPercentPrecision[.7519],
myPercentPrecision[.7519], Center, Bold, 18],
myPercentPrecision[1 - .7519]}}, ChartLayout -> "Stacked",
ChartStyle -> {EdgeForm[], {LLCCBlue, LightGray}}, BarSpacing -> 1.5,
ChartLabels -> {Placed[{Style["RDG-098\n", Bold, 22],
Style["RDG-099\n", Bold, 22]}, Above], None},
ChartLegends ->
Placed[{Style["Successful", 18], Style["Unsuccessful", 18]}, Right]]
The bar chart is inside a Manipulate function, but I've also tried building it outside of Manipulate, and I'm having the same issue with the label color.
BarChart[{ {Labeled[0.5, "White", Center, Bold, 18, White], 0.5}, {Labeled[0.25, "Green", Center, Bold, 18, Green], 0.25}}, ChartLayout -> "Stacked", ChartStyle -> {EdgeForm[], {Red, LightGray}}, BarSpacing -> 1.5]
If this doesn't work, you might need to specify what version of MMA you have or post more complete code. $\endgroup$