Que tipo de gráfico vc quer?
É de barras?
Se é de barras de uma olhada nesse código:
[code]package teste;
import java.io.File;
import java.io.IOException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
public class TesteJFreechart {
private DefaultCategoryDataset ds = new DefaultCategoryDataset();
private JFreeChart chart;
public TesteJFreechart() {
ds.setValue(50, "Maq 1", "Jan");
ds.setValue(80, "Maq 1", "Fev");
ds.setValue(30, "Maq 1", "Mar");
ds.setValue(20, "Maq 1", "Abr");
ds.setValue(100, "Maq 2", "Jan");
ds.setValue(40, "Maq 2", "Fev");
ds.setValue(40, "Maq 2", "Mar");
ds.setValue(60, "Maq 2", "Abr");
ds.setValue(30, "Maq 3", "Jan");
ds.setValue(50, "Maq 3", "Fev");
ds.setValue(70, "Maq 3", "Mar");
ds.setValue(90, "Maq 3", "Abr");
chart = ChartFactory.createBarChart("Funcionamento das Máquinas",
"Máquinas", "Horas", ds, PlotOrientation.VERTICAL,
true, true, true);
try {
ChartUtilities.saveChartAsJPEG(new File("c:/grafico.jpg"),
chart, 500, 300);
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new TesteJFreechart();
}
}[/code]
Esse código gera um gráfico de barras na raiz da sua unidade c:
espero q lhe ajude.