two strange problems about the DefaultCategoryDataset

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
memonono
Posts: 5
Joined: Wed Jun 23, 2004 2:54 pm

two strange problems about the DefaultCategoryDataset

Post by memonono » Wed Jun 23, 2004 3:21 pm

hi...

ok
am making charts for users and there statistics e.g.( bandwidth , sent bits ..... ect)

and my users objects are in arraylist called Globalusers
and am adding them into a dataset

am facing these two strange problems

1. when am making the category as the users region
it is giving me zero values when display

Code: Select all

dataset.addValue( ( (InternetUser) (Globalusers.get(i)) ).getRecNum() , series1, ( (InternetUser) (Globalusers.get(i)) ).getRegion() );
yet when the category is the Department or Buissness unit it gives a normal results

Code: Select all

dataset.addValue( ( (InternetUser) (Globalusers.get(i)) ).getRecNum() , series1, ( (InternetUser) (Globalusers.get(i)) ).getBU() );

2.The other interesting problem is
when displaying the results with the region category and the regions are duplecated and some of them in upper case and some are in lower

it gives e.g.( london = 438, LONDON = 3882, and PARIS = 3153)

so i thought that the datset category is case sensitive
then when i made the all in UPPERCASE format

guess what ??? :shock:
it gives this result
e.g.( LONDON = 438 , PARIS = 3153 )

oh my god :twisted:

and thank you for your help in advance

memonono
Posts: 5
Joined: Wed Jun 23, 2004 2:54 pm

Post by memonono » Wed Jun 23, 2004 3:34 pm

am sorry just now i saw that the category should be unique

is ther any why of grouping or something like that
or i have to make it myself ???

Locked