Why FreeChart is so tardiness?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Qiao Jian-nan

Why FreeChart is so tardiness?

Post by Qiao Jian-nan » Mon Dec 09, 2002 10:50 am

I try to put about 100 value in LineChart. But it is so slowness! What am I wrong?

David Gilbert

Re: Why FreeChart is so tardiness?

Post by David Gilbert » Mon Dec 09, 2002 11:08 pm

Hi Qiao Jian-nan,

I'm not sure, you don't give me much to go on. If you create the chart with an empty dataset, then add each value the chart will be redrawn each time you add a value (so you might be redrawing the chart 100 times). Better to create the dataset first, then the chart.

Aside from that, if you post some code and tell me how long it takes to draw the chart, plus:

- the JFreeChart version you are using;
- the JDK version you use;
- the operating system;
- your computer's CPU speed;
- available RAM;

...then I can take a guess at whether the speed is out of line with expectations.

Regards,

Dave Gilbert

Qiao Jian-nan

Re: Why FreeChart is so tardiness?

Post by Qiao Jian-nan » Tue Dec 10, 2002 3:03 am

Thank you. I've solved my question.
I try these words:

CategoryPlot plot = chart.getCategoryPlot();


// change the category labels to vertical...
HorizontalCategoryAxis domainAxis = (HorizontalCategoryAxis) plot.getDomainAxis();

domainAxis.setSkipCategoryLabelsToFit(true);

When the last line added, it is ok.

Locked