Adding individual labels to datapoints in bar chart

LibreOffice Version: 24.2.5.2
OS: Arch Linux, kernel 6.10.3
DE: KDE Plasma 6.1.3

Hi all. I’m using LibreOffice Calc to track a medical condition for my partner, and It’s working great, but there’s one thing I haven’t been able to figure out. My data consists of a single number value from 1-10 for every day of the month, so my first two columns are date and value. I have a third column for brief notes (just a couple of words), and I only have notes for a handful of days. They’re fairly important though, and when we visit her doctor, it’s important to see where they land on each chart. So far I haven’t figured out a way to get these notes to appear where I want them, so I’ve just been marking up the printouts with a pen each time.

To demonstrate I created a sample document (with fake data). I’ve attached the document below.

(I had a screenshot, but I can’t include it because I’m a new user)

For example, I would want the note about “too much mustard” to appear over the bar for 1/24. I’ve found a number of topics around the forums discussing data point labels (mostly on scatter plots), but I haven’t been able to make them work for my case. I understand that I need to use the third column as a category or a name, and then format the labels to use category or name respectively, but so far all I’ve done is mess up my X axis.

By editing the data ranges so that the “Name” range uses my notes column for Categories, I’ve gotten the labels to appear over the bars as I wanted. But, so far, every time I get the labels working, my X-Axis changes unexpectedly to match - the dates disappear and duplicate labels replace them. I don’t know how to avoid the change to the X-Axis.

Any input or advice would be appreciated. The document below shows the problem.
corndogs2.ods (57.1 KB)

The way labels in charts are created and handled is not satisfactory.
I don’t think there is a way to do what you want by standard means.
Out of a fundamental interest I “researched” a bit into the matter in 2022, and found a way to apply user defined labels to data points in x-y charts with the help of user code.
I never actually used the (raw) solution, and it can’t be applied “as is” to different chart types, but if you are fond of programming, you can start with what I have. Tell me.

Ugly but easy, put Notes next to Date and then create chart.
corndogs2_109133EA.ods (41.2 KB)

2 Likes

You can use an xy-chart and use “category” for your notes.
corndogs2_xy.ods (26.4 KB)

1 Like

There is a bug (tdf#162444) if labels are set to 90° (or 270°) and we try to move them.
As a workaround, set the angle to 89° or 91°.

Thanks both. I ended up just adding text boxes manually in the needed places, since that seems to be the only way to format the labels the way I want. It’s decent enough for a workaround.

(Is this actually a suggested solution? A final commnt?)

See also Bug 38760.
The bug is very old (2011-06-28), but its status still is “NEW”, meaning it was neither fixed nor set to “WONTFIX”.
It is specialized on XY-diagrams, but contains also two examples for workarounds. One of them was attached by myself, but does no longer work in V 24.8.
If somebody is interested: I created a respective update (48.0 KB) working in this very new version.