So when i make a Linechart it's very slow up to 80 sec
Someboby can tell me if it's ok or if my code is bad ?
My methode to create a Line Chart
Code: Select all
public DefaultCategoryDataset dataset=new DefaultCategoryDataset();
public double i[][]=new double[3][500];
public void CreateLineChart
{
JFreeChart chart=ChartFactory.createLineChart("","Echantillons","",dataset,PlotOrientation.VERTICAL,false,true,false);
CategoryPlot plot=chart.getCategoryPlot();
plot.getRenderer().setSeriesPaint(0,Color.red);
plot.getRenderer().setSeriesPaint(2,Color.blue);
plot.getRenderer().setSeriesPaint(1,Color.red);
plot.getDomainAxis().setTickLabelsVisible(false);
plot.getDomainAxis().setLowerMargin(0.00);
plot.getDomainAxis().setUpperMargin(0.00);
ChartPanel chartPanel=new ChartPanel(chart);
}
Code: Select all
public void addValue(String series,int j)
{
for(int k=0;k<i[0].length;k++)
{
dataset.setValue(i[j][k],series,""+k);
}
}
It's work on win2000
Thank for your reply
Lutchanah