Hi,
I have a simple 2D bar chart:
y-axis: profit rate
x-axis: time (dates: 08/2001, 09/2005...07/2006)
I just want to deactivate the lables/units at the x-axis because there are so many entries and it looks horrible.
I don't need them because I can write the range "from: mm/yyyy to: mm/yyyy" in a table next to the graph.
Could somebody tell me how to do this?
Thanks!!!
How do I deactivate labels/units on the x-axis?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
If you used an XYBarChart and a DateAxis, the labels would adjust automatically.
If you prefer to stick with the CategoryPlot, you can do this:
If you prefer to stick with the CategoryPlot, you can do this:
Code: Select all
CategoryPlot plot = (CategoryPlot) chart.getPlot();
CategoryAxis axis = plot.getDomainAxis();
axis.setTickLabelsVisible(false);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program