Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JDBCCategoryDataset dataset = new JDBCCategoryDataset(sqliteConnection.dbConnector(), query);
- JFreeChart chart = ChartFactory.createBarChart("Daily Sales", "Products", "Total Amount", dataset, PlotOrientation.VERTICAL, false, true, true);
- //ChartUtilities.saveChartAsJPEG(new File("C:\Users\users\Documents\Java\App Name\src\com\xxx\AppName\chart.jpg"), chart, 400, 400);
- BarRenderer render = null;
- CategoryPlot plot = null;
- render = new BarRenderer();
- plot = new CategoryPlot();
- ChartFrame frame = new ChartFrame("Store Keeper - Bar Chart", chart);
- frame.setVisible(true);
- frame.setSize(900, 500);
- } catch (Exception e) {
- JOptionPane.showMessageDialog(null, e);
- System.out.println(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement