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
x-axis data element maximum
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
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.
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


"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.
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.

-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 22
- Joined: Thu Jan 29, 2004 8:28 pm
Skip category labels
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
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
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Well, everyone has a price, but my price for this "feature" would be very high. Skipping category labels is a bad idea.Anonymous wrote:Maybe the question should be, How much will it cost to get the skipCategoryLabels feature reinstalled!
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

