x-axis data element maximum

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

x-axis data element maximum

Post by guest » Fri Mar 05, 2004 5:20 am

Hi Guys,

I'm building a chart that contains too many data. My x-axis elements can grow maybe upto 100. What's the maximum x-axis data elements can a jfreechart chart handle?

Guest

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Mar 05, 2004 3:35 pm

JFreeChart will allow you to display as many categories as you like on a CategoryAxis, but at some point the labels will overlap (exactly how many labels can be added depends on a lot of factors - the chart size, the label font size, label rotation etc.).

As a general rule, if you have so many categories that the labels begin to overlap then chances are you haven't summarised your data very well and you might want to look at using broader categories.

Or, if your categories are dates you should instead use the XYPlot class with a DateAxis for the domain axis.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Stacey
Posts: 15
Joined: Tue Jan 27, 2004 5:09 pm

Post by Stacey » Mon Mar 08, 2004 3:17 pm

"Or, if your categories are dates you should instead use the XYPlot class with a DateAxis for the domain axis."

I've argued this point too many times, but XYPlots are not the best fit for date times that are to the second or millisecond resolution. When only a few values (say 100 out of 86400secs) are existing throughout the day (but they are required to be displayed at the second resolution) the bars are nothing but extremely thin lines which are not very readable. Also, when attempting to zoom, the bar remains that thin and zooming never changes the bar width (as it does using BarRenderer), but rather only shrinks the axis max/min. At least if converting the dates to categories, the display was readable...well, it was readable with the skipping of labels.

I really miss the skip labels feature, but it sounds like it is gone forever. :cry:

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Mar 09, 2004 8:16 am

David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

phamdinhnguyen
Posts: 22
Joined: Thu Jan 29, 2004 8:28 pm

Skip category labels

Post by phamdinhnguyen » Thu Mar 18, 2004 5:51 pm

David,

It's quite convincing to me that there're many developers need to have the flexibility to skip category labels, which was available in previous versions.

I understand that you recommend using "the XYPlot class with a DateAxis for the domain axis". I found myself in agreement with other developers who rather not using this option. Its requirements of creating chart data is rather (code) lengthy and (CPU) time consuming. For instance, with a chart where the x-axis interval is 2-minute, for a 12-hour range, there're 360 elements/labels, and if the chart covers 24-hour range, that'll be 720 elements/labels. Rendering the chart takes just too long for our application, which definitely needs to group at 2-minute interval.

I have two questions, and would really appreciate your explanation:
a) What are the reasons that you so strongly decided to eliminate this feature from the official JFreeChart product, though this feature is so much needed by the developer community?
b) In due respect of your decision, can you help us, those who need, to incorporate the latest official product with the sources that will enable us this needed feature?

Thanks for your service.
phamdinhnguyen

Guest

Post by Guest » Tue Apr 27, 2004 7:51 pm

Maybe the question should be, How much will it cost to get the skipCategoryLabels feature reinstalled! :wink:

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Apr 28, 2004 10:25 pm

Anonymous wrote:Maybe the question should be, How much will it cost to get the skipCategoryLabels feature reinstalled! :wink:
Well, everyone has a price, but my price for this "feature" would be very high. Skipping category labels is a bad idea.

The most frequent reason for needing to skip category labels is people using dates as categories...in that case you shouldn't be using a CategoryPlot, but instead use an XYPlot with a DateAxis. If there is some limitation of the XYPlot getting in the way, I'll be happy to work on that limitation.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Guest

Post by Guest » Wed Jun 02, 2004 7:05 pm

You're a twit, Dave.

Locked