Search code examples
javanetbeansjfreechartbar-chart

Java Bar chart clickable bars


Is there is a way to click on a JFreeChart bar to lunch an event ? if there's any other chart libraries which support clickable bars please guide me to it, what i really need is after creating the chart the user is able to click on one of the bars to do some other work is that possible ?


Solution

  • Add a ChartMouseListener to the enclosing ChartPanel, as shown here.

    image