Reputation: 3222
I have a Swing application which uses JFreeChart to display one of a series of queries. Some of these queries have a composite TimeSeries key. Each component of this key can contain a few values, but when rendered makes a very noisy graph. I would like a simple way for the users to hide/show some of the TimeSeries in the displayed Chart component.
Upvotes: 1
Views: 1053
Reputation: 11
I'm not quite sure what you mean, but if you want to keep item shapes apart, have a look at the AnalysisXYItemRenderer
class (or corresponding). There's a transXDiff
there that can be used for such calculations (such as accumulating the diff and only show plot shapes when that accumulated value reaches a limit).
It was a couple of years ago I did this, so things might have changed in JFreeChart since then.
Upvotes: 0
Reputation: 4928
It looks like the setSeriesVisible method of AbstractRenderer is what you're looking for. Although this forum discussion suggests that it may only work in the latest release but there's a work around for earlier releases.
Upvotes: 1