#186 Minor tick marks on DateAxis

closed-accepted
None
5
2008-09-25
2008-01-13
No

I needed minor tick marks on my horizontal DateAxis, illustrated at http://picasaweb.google.com/amickish/JFreeChart/photo#5153499160795464114
Specifically, I wanted major tick marks every year, and minor tick marks every month.

So I overrode refreshTicks() in my DateAxis to add minor a minor DateTick for every month.

To support minor tick marks, I changed these 3 files in package org.jfree.chart.axis:

DateTick.java: a constructor that takes a TickType

ValueAxis.java: enhanced drawTickMarksAndLabels()
to draw minor tick marks

Axis.java: public methods and private members that
activate minor tick marks

These changes should have no effect on pre-existing user code. The old methods like isTickMarksVisible() still control major tick marks.

The new minor tick mark methods have names like isTickMarksMinorVisible() corresponding to the old (major) names.

Discussion

  • Andrew Mickish

    Andrew Mickish - 2008-02-25

    Axis.java, DateTick.java, ValueAxis.java

     
  • Andrew Mickish

    Andrew Mickish - 2008-02-25

    Logged In: YES
    user_id=934634
    Originator: YES

    Fixed bug in patch file and re-submitted
    File Added: MinorTickMarks.diff

     
  • Peter Kolb

    Peter Kolb - 2008-07-01

    Logged In: YES
    user_id=1984073
    Originator: NO

    The code was integrated into patch 1934255 (Minor Ticks and grids for XYPlot).
    All variables and setters/getters have been renamed. The "minor" now precedes the "tick", e. g. "DEFAULT_MINOR_TICK_MARK_INSIDE_LENGTH" and "isMinorTickMarksVisible()".
    Many thanks!

     
  • David Gilbert

    David Gilbert - 2008-09-25

    Thanks Andrew! This has been incorporated via patch 1934255 and will be included in the 1.0.12 release.

    Regards,

    Dave Gilbert
    JFreeChart Project Leader

     
  • David Gilbert

    David Gilbert - 2008-09-25
    • assigned_to: nobody --> mungady
    • status: open --> closed-accepted
     

Log in to post a comment.