Hey Group,
I have been using Jfreechart 1.0.13 for last couple of days. I have checked out the new feature axis.setMinorTickMarksVisible(true) for showing the minor tick marks.
Now the problem is. On the dateAxis, I have choosen to setAutoRange(true) to display dates in the Axis.
My DateAxis start at 10/11(Minstart, not displayed), then 10/15 ( is displayed), 11/01 ( is displayed) and 11/05 ( last one, not displayed). So on the date axis I can only see 10/15 and 11/01 dates. Now I want to display MinorTicks between 10/11 - 10/15 (4), between 10/15-11/01 (16), and between 11/01 - 11/05 (4).
If I am using axis.setMinorTickCount(4). Only 4 minor ticks are displayed between the MajorTicks in dateAxis, but I need 16 in between some dates.
Can someone help me. Please let me know if I need to be more clear.
How Can i upload a image from my desktop ?
Thanks,
Customerized Minor Tick Count
-
- Posts: 6
- Joined: Fri Nov 13, 2009 10:02 pm
- antibot: No, of course not.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Customerized Minor Tick Count
Call setMinorTickCount(16).
Minor ticks that are outside the axis range will not be drawn.
Minor ticks that are outside the axis range will not be drawn.
-
- Posts: 6
- Joined: Fri Nov 13, 2009 10:02 pm
- antibot: No, of course not.
Re: Customerized Minor Tick Count
What if all the dates are in Range for the DateAxis.
-
- Posts: 6
- Joined: Fri Nov 13, 2009 10:02 pm
- antibot: No, of course not.
Re: Customerized Minor Tick Count
Can someone please guide me with this issue. I tried saying setMinorTickCount(16), but if some dates are in range for the axis like 10/15 10/20 i want 4 minor ticks between them, but I get 16 as I use the above statement.
Help please.
Thanks,
Help please.
Thanks,
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Customerized Minor Tick Count
A DateAxis (as any subclass of ValueAxis) will create the given number of minor ticks. If you want to change that, you will have to subclass DateAxis and override the refreshTicks, refreshTicksVertical and refreshTicksHorizontal methods.