Data retriving from database using CategoryChart

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

Data retriving from database using CategoryChart

Post by Ajay R Garkemukhu » Thu Sep 05, 2002 8:04 am

I have written a servlet program which will pick a value from ORACLE database & displays a vertical bar chart

When I executes a servlet, the value part is displayed correctly but the category part gets jumbled i.e the values in database are

Category Value
----------------------
A 10
B 12
C 20

But when servlets gets executed it shows vertical bar chart as

Category Value
----------------------
B 10
C 12
A 20

And again after sometime I executes a same code the category data gets changed as

Category Value
----------------------
A 10
C 12
B 20

Please help me out from above problem

Regards,
Ajay R Garkemukhu
CMC Limited

David Gilbert

Re: Data retriving from database using CategoryChart

Post by David Gilbert » Thu Sep 05, 2002 8:29 am

This is probably this bug in JdbcCategoryDataset:

http://sourceforge.net/tracker/index.ph ... tid=115494

It has been fixed in 0.9.3.

Regards,

DG

Bryan

Re: Data retriving from database using CategoryChart

Post by Bryan » Thu Sep 05, 2002 8:45 am

Ajay

Are you using JdbcCategoryDataset? If so there is a fix in the current version relating to this sort of output. Are you using version 0.9.3? These are in JCommon.jar file. Not sure if these are in 0.6.4 (probably not yet).

DG generally releases a new jar file of jcommon with jfreechart.jar version. So I suspect a new version will not be far away. If you are in a rush, download from the CVS and compile in your project.

Bryan

Ajay R Garkemukhu

Re: Data retriving from database using CategoryChart

Post by Ajay R Garkemukhu » Thu Sep 05, 2002 10:45 am

Hi DG,

Where will I find 0.9.3, I have visited the above site what u have mentioned. But din't find any thing relating to 0.9.3

Regards,
Ajay R Garkemukhu

Bryan

Re: Data retriving from database using CategoryChart

Post by Bryan » Fri Sep 06, 2002 4:02 am

Ajay

0.9.3 refers to JFreechart.jar. (should have explained this.)

Bryan

David Gilbert

Re: Data retriving from database using CategoryChart

Post by David Gilbert » Fri Sep 06, 2002 10:02 am

The latest versions are JFreeChart 0.9.3 and JCommon 0.7.0. With these versions, the com.jrefinery.data package (which contains the JdbcCategoryDataset class) is now included in JFreeChart instead of JCommon as it was previously.

Regards,

DG.

Ajay

Re: Data retriving from database using CategoryChart

Post by Ajay » Wed Sep 11, 2002 12:08 pm

Hi DG,

Thanks for the help provided to me. My problem has been sorted out.

Regards,
Ajay R Garkemukhu

Locked