Better formatting options for annotation layers
Screenshot
Currently:
Desired:
Description
Annotation layers on time-series charts are hard to read and cannot really be better formatted from the UI.
- Annotation labels are rendered with default styling only: the text is rotated vertically (90°), so you have to tilt your head to read it and still then it's not practical nor easy for the user to read.
- The only options available in the Customize tab are opacity, line style, hide line and show/hide markers. There is no way to control the label's font size, color, background, position or text wrapping.
- Since these charts are canvas-rendered, custom dashboard CSS cannot fix this — the UI options are the only lever.
- So far, we list the annotation in a markdown bloc instead of using the annotation, but I think the feature could be greatly improved by this visual tweak.
Design input
Would it be able to rotate by 90º the annotations, get them a similar styling as the current tooltip used when hovering over a data point? It would improve a lot the readability and understanding of annotated charts.
Thanks a lot in advance 🙏
Hi! I’d like to work on this issue and explore improving the readability and formatting of annotation labels in time-series charts.
I’m planning to investigate the existing implementation first and identify a small, testable improvement. Before I get started, could you please let me know if anyone is already working on this or if there’s a preferred approach for implementing it?
Thanks!
@kasiazjc want to get your thoughts on this design.
@prachisinghal-1 we don't really need to ask to work on issues here. Grab and work on them but we just ask that you commit to getting it done so we can close out the issue or else someone may take it over.
Hi @prachisinghal-1, are you still working on this? If you haven't started, I'd be happy to take it.
Proposed minimal scope: render event annotation labels horizontally with a tooltip-like background (readable by default), plus one option (label position) in the annotation layer's Customize section. Interval labels get the same styling. @kasiazjc, happy to adjust to whatever design you prefer.
Thanks for the clear before/after screenshots. Looking at the mockup, a few details seem worth settling before anyone implements this:
-
Side placement: the desired label sits to the left of the line, while the hover tooltip appears to the right. Should the label flip sides near the chart edge, so it doesn’t collide with the tooltip or get clipped?
-
Long text: should it wrap at a max width, truncate with an ellipsis, or expand on hover?
-
Replace vs. option: should the horizontal tooltip-style label replace the current vertical one, or be selectable in the Customize tab? Replacing it changes how existing dashboards look.
-
Scope: it might be cleaner to ship the restyle first and treat label-position, font size and color options as a follow-up.
@kasiazjc, would love your input on the design. Happy to help review a PR once the direction is settled.
Hi! @bangarusaivivek , Yes, I'm actively working on this issue. I've started investigating the existing annotation-label implementation and am exploring a minimal, testable improvement.
I appreciate your proposed scope. I'll continue working on it and aim to put up a PR soon. Thanks!
Hey @prachisinghal-1, hope you are doing well! Any news on that topic ? 🔥
Hey ! Thanks for checking in. I'm currently working on the implementation and testing the changes to ensure everything works as expected. I'll share an update once I have something ready. Thanks for your patience!