Last tick label not shown fully

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Narayan
Posts: 30
Joined: Wed Apr 11, 2007 11:20 am
Location: Bangalore

Last tick label not shown fully

Post by Narayan » Mon Apr 23, 2007 1:02 pm

Hello,

I am using TimeSeriesChart and my pattern for the tick label in the x axis is "MMM-dd-yyyy". But the last tick label in the x- axis shows only a part of it. For example "Jun-12-200". But the same code works fine for different number of series values ie. it gives the problem when there are 1 - 13 values in the series. If there are 14-16 values in a series, it works fine.
Can you please suggest me what I should do to get the full tick label? Do I need to override the refreshTicks() method ?? Or is there any easier way out.

Thanks a lot for the reply in advance

Regards,
Narayan

Narayan
Posts: 30
Joined: Wed Apr 11, 2007 11:20 am
Location: Bangalore

Post by Narayan » Mon Jun 18, 2007 4:06 pm

Hi All,

I am facing this problem sometimes, while many times it works very well..
Suppose if I have "Jan 12, 2007" as my last tick label, sometimes I am able to see only "Jan 12," and sometimess "Jan 12, 2" etc.
Can anyone let me know how this can be fixed.

Regards,
Narayan

Narayan
Posts: 30
Joined: Wed Apr 11, 2007 11:20 am
Location: Bangalore

Post by Narayan » Mon Jun 18, 2007 5:17 pm

Hi All,

I am facing this problem sometimes, while many times it works very well..
Suppose if I have "Jan 12, 2007" as my last tick label, sometimes I am able to see only "Jan 12," and sometimess "Jan 12, 2" etc.
Can anyone let me know how this can be fixed.

Regards,
Narayan

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Jun 18, 2007 5:25 pm

This is a long standing bug. After I get the 1.0.6 release cleared away (I'm working some more on the documentation right now) and another little job I have to do, I'll have a look at this.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

ashish_sriv
Posts: 20
Joined: Tue Jan 16, 2007 1:54 pm

Cannot see complete tick label

Post by ashish_sriv » Thu Jun 21, 2007 10:34 am

Has this problem resolved in the latest version of JFreeChart? If yes what set of code have to write for the same?

Thanks,
Ashish

aruna
Posts: 2
Joined: Mon Sep 01, 2014 7:45 am
antibot: No, of course not.

Re: Last tick label not shown fully

Post by aruna » Mon Sep 01, 2014 7:50 am

Am currently using jfreechart-1.0.19.jar and yet the last tick labels not shown completely. The tick labels are just numbers. If it is a single digit, the label is fine, but if it is a double digit, a part of the units place digit is not shown properly. Any fix?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Last tick label not shown fully

Post by david.gilbert » Mon Sep 01, 2014 8:38 am

This has been a long-standing issue in the JFreeChart axes and there is no fix at present. The only workaround is to add additional insets to the right side of the plot to make room for the label to display (not ideal).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

aruna
Posts: 2
Joined: Mon Sep 01, 2014 7:45 am
antibot: No, of course not.

Re: Last tick label not shown fully

Post by aruna » Wed Sep 03, 2014 3:21 am

Thanks David, I have used the work around suggested by you(using insets)

plot.setInsets(new RectangleInsets(0, 0, 0, 15));

That served my purpose.

Locked