How to change the size of data coordinate tooltip?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sprajagopal
Posts: 1
Joined: Sat Jan 09, 2016 11:33 am
antibot: No, of course not.

How to change the size of data coordinate tooltip?

Post by sprajagopal » Sat Jan 09, 2016 11:37 am

Hi,
I have been using jfreechart for plotting scientific data. The default tooltip that appears is way too small for convenience. Is there a way to make the data tooltip that appears at proximity to a xyseries, bigger?
I tried the following without success:
1. google a lot.
2. Use ToolTipManager.setPreferredSize
3. Search for ways to acquire the datatip as a JComponent and then setPrefferedSize on it. I couldn't find any ways to acquire the JComponent.
Thanks,
Prasanna.

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

Re: How to change the size of data coordinate tooltip?

Post by John Matthews » Sun Jan 10, 2016 2:05 am

ChartPanel is the JComponent that holds a reference to the shared instance of the ToolTipManager, but setPreferredSize() won't change the size of the toptip text. You could try changing the font or using HTML.

Locked