I have a problem with my charts, the DateAxis labels are getting cutted. Any ideas how to solve it ?
Visit those links for example charts.
http://www.imagedump.com/index.cgi?tp=479929
http://www.imagedump.com/index.cgi?tp=479927
http://www.imagedump.com/index.cgi?tp=479928
Here the relevant code:
Code: Select all
chart = ChartFactory.createXYLineChart(
chartConfig.chartTitle, // chart title
this.chartConfig.axisTitleX, // domain axis label
this.chartConfig.axisTitleY, // range axis label
dataset, // data
PlotOrientation.VERTICAL, // the plot orientation
true, // legend
true, // tooltips
false // urls
);
XYPlot plot = chart.getXYPlot();
DateAxis da = new DateAxis(chartConfig.axisTitleX);
da.setDateFormatOverride(new SimpleDateFormat("MM-dd-yy", Locale.getDefault()));
plot.setDomainAxis(da);