Hello. I am attempting to show hide dataLabels when {value} = 0. I have stacked columns that show 0s for stacks that have no data, and changing the source to show NULL instead of 0 removes the whole stacked bar.
Here is the plotOptions block with the format line commented out. When I enable the line, all labels disappear.
“plotOptions”: {
“column”: {
“stacking”: “normal”,
“dataLabels”: {
“enabled”: true,
//“format”: “{value}”,
“color”: “white”,
“style”: {
“textOutline”: “1px contrast”
}
}
},
“series”: {
“borderRadius”: “10%”,
“borderColor”: “#4B4B4B”
}
}
What I was originally trying to do was this line:
“format”: “{#if (gt value 0)}{value}{/if}”
All of this is in an effort to conditionally format a stacked bar. It’s working fine, except for the dataLabels. Thank you.
Hello @tjohnson
My impression, even with high charts, is that data labels are an all or nothing option. I’m not confident there is a way but that being said it may just be the syntax you’re using.
Can you try using the syntax they show in this demo video from AWS using the case
statement (Conditional formatting section starts at 19:50):
Hey @tjohnson
Were you able to try using the syntax mentioned in the video or were you able to find another solution?
Hello.
Trying to get some time to play with the syntax. Should be able to attempt by tomorrow.
1 Like
Hi Duncan. This will potentially serve a purpose for me down the road, but attempting to dynamically change the color of the data labels will be too laborious with as many stacks as I’m working with. The permutations are too great. Thanks for the link, though.
Hey @tjohnson
No problem, for now I will mark this as a feature request for the QuickSight team.