Hi!
I just integrated JFreeChart 0.9.2 into a test application. Great product!
Two suggestions:
1. Make JChartPanel.displayPopup() protected. This way one can customize the popup based on the location and store the location (x, y) for processing of actions triggered by menu selection.
Alternatively, if JChartPanel.displayPopup() should become more complex (there are some comments that hint at this), add an empty method preDisplayPopup(int x, int y) that gets called on the first line of displayPopup().
2. It would be great to have a method that from the (x, y) coordinates returns the category and series of a CategoryPlot displayed at this position. (It is already possible to derive the category with the help of CategoryPlot.getCategoryCoordinate()).
Thanks,
Martin
Suggestions: popup & category/series
Re: Suggestions: popup & category/series
Martin Buechi wrote:
> Two suggestions:
>
> 1. Make JChartPanel.displayPopup() protected. This way one
> can customize the popup based on the location and store the
> location (x, y) for processing of actions triggered by menu
> selection.
A nice idea, thanks for the suggestion. I'm busy on other things right now, so if you (or someone else) want to flesh out the code and commit it to CVS (or e-mail me the changes) I'll be very appreciative.
> Alternatively, if JChartPanel.displayPopup() should become
> more complex (there are some comments that hint at this), add
> an empty method preDisplayPopup(int x, int y) that gets
> called on the first line of displayPopup().
>
> 2. It would be great to have a method that from the (x, y)
> coordinates returns the category and series of a CategoryPlot
> displayed at this position. (It is already possible to derive
> the category with the help of
> CategoryPlot.getCategoryCoordinate()).
This information is in the ChartRenderingInfo class (see the method in the EntityCollection class)...there's still some work to do on this though.
Regards,
DG.
> Two suggestions:
>
> 1. Make JChartPanel.displayPopup() protected. This way one
> can customize the popup based on the location and store the
> location (x, y) for processing of actions triggered by menu
> selection.
A nice idea, thanks for the suggestion. I'm busy on other things right now, so if you (or someone else) want to flesh out the code and commit it to CVS (or e-mail me the changes) I'll be very appreciative.
> Alternatively, if JChartPanel.displayPopup() should become
> more complex (there are some comments that hint at this), add
> an empty method preDisplayPopup(int x, int y) that gets
> called on the first line of displayPopup().
>
> 2. It would be great to have a method that from the (x, y)
> coordinates returns the category and series of a CategoryPlot
> displayed at this position. (It is already possible to derive
> the category with the help of
> CategoryPlot.getCategoryCoordinate()).
This information is in the ChartRenderingInfo class (see the method in the EntityCollection class)...there's still some work to do on this though.
Regards,
DG.