0

I want to add chartmouselistener() to some specific point of this graph like in (1,1),(2,4),(3,3) and so on and print something.

I don't want mouselistener() for the whole panel. mouselistener() will work only when I will click on predefined point.

Can anyone suggest how to do it?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Mahmudur Rahman
  • 640
  • 1
  • 6
  • 23

1 Answers1

1

You're supposed to add a ChartMouseListener to the whole panel and then call ChartMouseEvent.getEntity() to figure out which point was clicked.

satnam
  • 10,719
  • 5
  • 32
  • 42