XY stacked bar chart add labels to bars

I want to add labels inside stacked bar charts in an XY chart. I've tried this: How to display values above columns in XY Chart? - Ignition - Inductive Automation Forum

Changing dx and dy of line.appearance.bullets[0].label.position works with the first line, but the problem is that the red line starting position depends on the value. I want the label of the red bar to be placed after the blue bar.