Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. JDBCCategoryDataset dataset = new JDBCCategoryDataset(sqliteConnection.dbConnector(), query);
  2. JFreeChart chart = ChartFactory.createBarChart("Daily Sales", "Products", "Total Amount", dataset, PlotOrientation.VERTICAL, false, true, true);
  3. //ChartUtilities.saveChartAsJPEG(new File("C:\Users\users\Documents\Java\App Name\src\com\xxx\AppName\chart.jpg"), chart, 400, 400);
  4. BarRenderer render = null;
  5. CategoryPlot plot = null;
  6.  
  7. render = new BarRenderer();
  8. plot = new CategoryPlot();
  9. ChartFrame frame = new ChartFrame("Store Keeper - Bar Chart", chart);
  10. frame.setVisible(true);
  11. frame.setSize(900, 500);
  12.  
  13. } catch (Exception e) {
  14. JOptionPane.showMessageDialog(null, e);
  15. System.out.println(e);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement