Add tooltips to annotations

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
worldsocold34
Posts: 1
Joined: Wed Jul 26, 2017 6:38 pm
antibot: No, of course not.

Add tooltips to annotations

Post by worldsocold34 » Wed Jul 26, 2017 6:42 pm

Image

How would I add tooltips to a TextAnnotation on a JFreeChart barchart?

Specifically, I want to add a tooltip to a CategoryTextAnnotation.

To prevent a long annotation from taking up too much space on the graph, I am limiting the amount of characters that can be shown. However, I want to be able to see the full annotation in a tooltip by hovering over the shortened annotation text. As in the example picture, I want to hover my cursor over "long piece of text..." and have a tooltip show up.

Thanks in advance.

John Matthews
Posts: 513
Joined: Wed Sep 12, 2007 3:18 pm

Re: Add tooltips to annotations

Post by John Matthews » Thu Jul 27, 2017 1:16 am

Cross-posted here.

Locked