Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#204 LogAxis.refreshTicksVertical() only makes MINOR ticks

closed-accepted
David Gilbert
None
5
2008-03-19
2008-02-26
Andrew Mickish
No

There is a typo in LogAxis.refreshTicksVertical().

It should create MAJOR tick marks, then MINOR tick marks.

The first occurrence of "MINOR" in the method should be changed to "MAJOR", to read like this:

...
while (current <= end) {
double v = calculateValue(current);
if (range.contains(v)) {
ticks.add(new NumberTick(TickType.MAJOR, v, createTickLabel(v),
textAnchor, TextAnchor.CENTER, 0.0));
}
// add minor ticks (for gridlines)
double next = Math.pow(this.base, current
+ this.tickUnit.getSize());
for (int i = 1; i < this.minorTickCount; i++) {
double minorV = v + i * ((next - v) / this.minorTickCount);
if (range.contains(minorV)) {
ticks.add(new NumberTick(TickType.MINOR, minorV, "",
textAnchor, TextAnchor.CENTER, 0.0));
}
}
current = current + this.tickUnit.getSize();
}
...

Discussion

  • Andrew Mickish
    Andrew Mickish
    2008-02-26

    Change to LogAxis.refreshTicksVertical()

     
    Attachments
  • David Gilbert
    David Gilbert
    2008-03-19

    Logged In: YES
    user_id=112975
    Originator: NO

    Thanks for spotting that. The patch is committed to Subversion for inclusion in the upcoming 1.0.10 release.

    Regards,

    Dave Gilbert
    JFreeChart Project Leader

     
  • David Gilbert
    David Gilbert
    2008-03-19

    • assigned_to: nobody --> mungady
    • status: open --> closed-accepted