I'm working with cewolf sice 3 days.
And now I have a problem with a generated chart. I have an table with values for each day of the last month. The chart shows me a filled area depending of the value for each day. The x-axis shows the date for the entry. But there are to many dates on the x-axis so that I can not read the date
My question is :
How can I change the x values to avoid the problem ? Can I define an auto scale for that ?
I tried it with the PostProcessor - without success.
Try to make the labels smaller in your postprocessor, for example if just the day of the date is enough then do this:
CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot();
DateTickUnit dtu = new DateTickUnit(DateTickUnit.DAY, 1, new SimpleDateFormat("d"));
Also you can try to play with other parameters of the Axis (categoryplot.getRangeAxis()), like lowering the font size using axis.setLabelFont().
Generally I'd recommend you to create a small GUI application displays your graph with some static data where it is fast to play with the chart look, then collect all stuff you figured out and put to a postprocessor. Then have a look a JFreechart's doc/forums/source for all the objects and properties.
thanks for your response.
But that didn't solve my problem.
I have found a solution with the following code :
HorizontalCategoryAxis axis = (HorizontalCategoryAxis)plot.getDomainAxis();
But yesterday I switch to cewolf 10 and the methode setSkipCategoryLabelsToFit is not longer supported. And i didn't find an equivalent method.
Any ideas ?
i hate to sound like a broken record, but check www.jfree.org
I am far from an expert on JfreeChart, the people there certainly are and can provide more help on their API.
You can get access to the jfree chart object using a cewolf postprocessor.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.