2

I noticed that if I hover over my graphs it shows the tooltips like expected, but after a certain time they disappear. Now I managed to get around this problem by using setDismissDelay of the ChartPanel and setting it to a very high number, but this doesn't look like best practise.

Is there a better way to do this, maybe disable the method that hides the tooltip?

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
BadKarma
  • 39
  • 1
  • 5
  • 1
    I doubt it. A tool tip is there to inform the user about a particular element in your program if the user so wishes to see it. If it's going to be there indefinitely, it will get in the way of the user. So if you require that functionality you are going to have to roll your own solution out. – Thihara Jun 20 '13 at 07:30
  • It only shows up if the user hovers over the same spot for some seconds and dissapears if he moves the mouse. However it should not dissapear if he does not move the mouse and thats what iam looking for – BadKarma Jun 20 '13 at 07:50

1 Answers1

1

Instead of altering the tooltip parameters, add a ChartMouseListener that updates an adjacent component in its chartMouseMoved() handler. You can display the same data as the tooltip generator, and it won't change until the mouse moves. There's a related example here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045