DateAxis labels are getting cutted.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
guiding5
Posts: 8
Joined: Mon Mar 06, 2006 5:24 pm

DateAxis labels are getting cutted.

Post by guiding5 » Mon Dec 25, 2006 1:46 pm

Hi guys!

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);
Thanks !

Locked