Ignore zero...

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

Ignore zero...

Post by Israel » Mon Dec 16, 2002 2:58 pm

Hi,

I am trying to create a graph of line with "I ignore Zero", or either, if the remaining portion of the values of the graphs will be 0, then they are not shown, and the line is interrupted in the last different value of 0.

Israel

David Gilbert

Re: Ignore zero...

Post by David Gilbert » Mon Dec 16, 2002 5:48 pm

Hi Isreal,

You might have to explain that again, I'm not sure what you are asking...

Regards,

Dave Gilbert

Israel

Re: Ignore zero...

Post by Israel » Mon Dec 16, 2002 6:40 pm

With the class XYSeries, I make line graph, where the series do not need to start in the same position, however the problem is that alone it serves with 2 numerical parametros (axle X and axle Y), but wanted that in axle X I could place name of people, or date for extensive and with the series starting in different positions.

Ex: Analyzing vendas of cooling in a store during the year of 2001, a sample of vendas of each was caught month. I ordered these vendas orderly decreasing and in case that vendas will be 0, I do not want that he shows in the generated graph.

How to make this?

David Gilbert

Re: Ignore zero...

Post by David Gilbert » Mon Dec 16, 2002 6:45 pm

If you want to display non-numerical data on the x-axis, then you are probably best using the CategoryDataset interface (the DefaultCategoryDataset class implements this interface).

There's no way to exclude categories with zero values, apart from not putting them into the dataset to begin with.

Regards,

Dave Gilbert

Israel

Re: Ignore zero...

Post by Israel » Tue Dec 17, 2002 11:45 am

Same that I put "null" value in the positions??

Israel

Re: Ignore zero...

Post by Israel » Tue Dec 17, 2002 2:45 pm

If I to put 10 categories and to put only 5 values. It goes to complement the remaining values with 0?

Locked