Zack Newsham
Zack Newsham

Reputation: 2992

JFreeChart highlight bar chart item on click immediately

I have a bar chart using JFreeChart, I have it setup to highlight the selected (by click) and mouseover bars. The bars change colour when highlighted. However, they take about 1.5 seconds to update - my guess is its the next time the dataset changes.

How can I force the renderer to be called immediately?

Upvotes: 0

Views: 416

Answers (1)

Zack Newsham
Zack Newsham

Reputation: 2992

In typical good timing I figure out the answer right after posting:

    objChart.getCategoryPlot().datasetChanged(new DatasetChangeEvent(cme, dataset));

Nice and easy.

Upvotes: 1

Related Questions