daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dataset Draw Chart with JFreeChart and MySQL DB [closed]
  2. for (int i =0 ; i<typesPannes.length ; i++)    
  3. {
  4.     ResultSet res = st.executeQuery(req+" and typeDerang = '"+typesPannes[i]+"'");  
  5.     System.out.println(req+" and typeDerang = '"+typesPannes[i]+"'");
  6.     int count=0;
  7.     while (res.next()) {    count++ ; }
  8.     System.out.println(count) ;  
  9.     dataset.setValue(count, " "  ,  typesPannes[i]);
  10. }      
  11.     JFreeChart chart = ChartFactory.createBarChart ("BarChart using JFreeChart","row", "col", dataset,
  12.     PlotOrientation.VERTICAL, false,true, false);
  13.     chart.setBackgroundPaint(Color.yellow);
  14.     chart.getTitle().setPaint(Color.blue);
  15.     CategoryPlot p = chart.getCategoryPlot();
  16.     p.setRangeGridlinePaint(Color.red);
  17.     ChartPanel ch1=new ChartPanel(chart);
  18.     panel.add(ch1);
  19.    
  20. dataset.setValue(count, " "  ,  typesPannes[i]);
  21.    
  22. dataset.setValue(count, typesPannes[i], "");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top