title: Read csv file to draw a pie chart in JfreeChart
body: <p>I'm trying to read each csv file from a directory and do some calculations, using the ratio from each category to draw a pie chart using JFreeChart. Using PieChartDemo1.java as sample, where I should specify FileReader and pass the variables to datasest? I kept getting error message from the compiler. I have a demo coming soon in a week, any help will be appreciated!</p>
  
  <pre><code>      DefaultPieDataset dataset = new DefaultPieDataset();
        //FileReader...
        //int sum = countA + countB + countC;
        //double ratioA = countA / double(sum) * 100.0;
        //.....
        dataset.setValue("Category A", new Double(ratioA));
        dataset.setValue("Category B", new Double(ratioB));
        dataset.setValue("Category C", new Double(ratioC));
        //....
  </code></pre>