Currently, I am working on creating a milestone comparison chart where I want the data labels to be positioned above the milestone markers. These data labels consist of two rows of text.
To achieve this, I have customized the chart.height
property to increase the row height in order to accommodate the data labels perfectly within each row. By utilizing a combination of series.point.graphic.translate()
and series.datalabels.y
, I am able to position everything vertically within the row as desired. While I have almost perfected the layout to my liking, there seems to be an issue with how the data labels for the first row are being displayed.
Instead of adhering to the y offset that I have set using series.datalabels.y
, it appears that more offset is being applied which causes the data labels to shift all the way up to the top of the plot area.
In the screenshot provided, you can see red lines indicating the minimal offset that should be maintained for the data labels near most milestone markers/labels. However, the red boxes in the top row illustrate how excessive offset is causing the labels to be pushed too high, with the label's top edge touching the plot area's edge:
https://i.sstatic.net/JyMPe.png
I am seeking insight into why this is happening and how I can resolve this issue. Any guidance would be greatly appreciated.