I have created a csv file,
and display data from database into that file,
how can I add a pie chart to that file,
this is the code which I made:
File file = new File("C:/Users/MY TOSHIBA/Desktop/chart.CSV");
Writer output =null;
output = new BufferedWriter(new FileWriter(file));
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@ 127.0.0.1:1521:XE","username","password");
String sql="select * from mawarid";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sql);
while(rs.next())
{
String teller =rs.getString("name");
String flag=rs.getString("flag");
output.write(teller+flag+"\n");
}
output.close();