Bar chart category's sorting problem

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Francesco

Bar chart category's sorting problem

Post by Francesco » Wed Feb 26, 2003 3:58 pm

Hi to everyone. I have a little problem with bar charts.

I want to make a statistic on different requests I receive devided on time periods (dayly, monthly and yearly). I decided to use the verticalbarchart where the different categories are the day or month or year (depending on the time period). The problem is that the categories are wrong sorted.
For example, if I have (for a monthly period) 02.2003, 03.2003, 04.2003, 05.2003, 02.2004, 02.2005 (these are test values) than in the chart I have them in the following order: 02.2003, 02.2004, 02.2005, 03.2003, 04.2003, 05.2003.

With a dayly period the order is wrong too.

Can someone help me telling me how can I fix this problem, please?

Thanx in advance

Francesco

David Gilbert

Re: Bar chart category's sorting problem

Post by David Gilbert » Fri Feb 28, 2003 2:04 am

Hi Francesco,

Do you have any details on how you put together the dataset? I'm not aware of anywhere that the categories get sorted...they should stay in the order that you add them to the dataset.

Regards,

Dave Gilbert

Locked