Reputation: 7766
I have heard of JfreeChart but is there any general steps for using data returned from an SQL query to create graphs and chart.
I have an application that shows as a menu option "Analytic's", this Jframe window uses complicated query to retrieve data using business logic but i want to then display this data in a more viable way (rather than a long Jtable result). How can i filter my data and create a graph for the user to analyze?
Upvotes: 1
Views: 5766
Reputation: 13728
Since you are in search... I think that there is no better tool for designing and generating reports and graphs from your database than iReport. It offers a very consistent GUI, and gives you all support necessary to start creating business graphs from your database data.
The produced report is dynamic. Can be embedded into any application. The reports can be exported as PDF, XML, XHTML, .doc, .odt and more ways. One can pass variables to the report at run-time like from-to Dates, code-id's etc.
iReport is built on top of JasperReports. It is free and open source.
Let me make also clear that i am not in any way affiliated with iReport! :-)
Upvotes: 0
Reputation: 23629
Generally you can fill your own dataset based on your ResultSet. But if you are query is returning results close enough to what you are loading into your dataset you can just use the JDBCCategoryDataset from JFreeChart.
Upvotes: 1
Reputation: 4316
Check java2s.com/Code/Java/Chart/CatalogChart.htm for a lot examples.
Upvotes: 1