Multiple ticks on axis?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
pkubanek
Posts: 3
Joined: Tue Jun 27, 2006 6:21 pm

Multiple ticks on axis?

Post by pkubanek » Fri Dec 01, 2006 5:30 pm

Hi,

I need to have multiple ticks on single axis - e.g. bigger marking every 10th tick, middle size for every 5th and even smaller for unit tick. I think JFreeChart currently does not support it.

The ideal design should be ValueAxis holding list of AxisTick classes, which can be added, make to create label etc. Then draw method will draw them in order (and method used to compute size should include them in axis size computation). That can be pretty easily make by moving MarksAndLabes method from ValueAxis to AxisTick.

I can design that, I'm just interested to see if that:
- isn't duplication of know work (e.g. nobody else is working on that)
- if proposed design looks good, or you have some other ideas
- if my patch will be considered for commitment to the source

Regards

Petr Kubanek
ISDC, Versoix

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

Re: Multiple ticks on axis?

Post by david.gilbert » Mon Dec 04, 2006 5:11 pm

pkubanek wrote:I need to have multiple ticks on single axis - e.g. bigger marking every 10th tick, middle size for every 5th and even smaller for unit tick. I think JFreeChart currently does not support it.
Correct. This would be a nice feature to support.
pkubanek wrote: - isn't duplication of know work (e.g. nobody else is working on that)
No one is yet, as far as I know. It might pay to review the patches list at SourceForge, though, someone might have submitted something that I've missed.
pkubanek wrote: - if proposed design looks good, or you have some other ideas
I'd like something that fits into the existing tick unit selection mechanism, so that the axis scale adjusts automatically as the range changes.
pkubanek wrote: - if my patch will be considered for commitment to the source
Yes, this is something that needs to be added to the standard API.

Are you subscribed to the jfreechart-developers mailing list? That would be the best place to discuss implementing this...here in the forum, everything gets swamped by support requests.
David Gilbert
JFreeChart Project Leader

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

pkubanek
Posts: 3
Joined: Tue Jun 27, 2006 6:21 pm

Re: Multiple ticks on axis?

Post by pkubanek » Mon Dec 04, 2006 5:32 pm

pkubanek wrote: - isn't duplication of know work (e.g. nobody else is working on that)
david.gilbert wrote:No one is yet, as far as I know. It might pay to review the patches list at SourceForge, though, someone might have submitted something that I've missed.
I already checked patches, no one seems to focus on that, so I'll try to write one..let's see what then happens:)
pkubanek wrote: - if proposed design looks good, or you have some other ideas
david.gilbert wrote:I'd like something that fits into the existing tick unit selection mechanism, so that the axis scale adjusts automatically as the range changes.
I fully understand that and will try my best to fit within standart scaling mechanism.

Petr

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

Re: Multiple ticks on axis?

Post by david.gilbert » Mon Dec 04, 2006 6:33 pm

pkubanek wrote:
david.gilbert wrote:I'd like something that fits into the existing tick unit selection mechanism, so that the axis scale adjusts automatically as the range changes.
I fully understand that and will try my best to fit within standart scaling mechanism.
Great. Note that I have on my to-do list to fix the problem with the current scaling mechanism where it fails for very small or very large data items, so if that aspect of the axis scaling bothers you, we can talk about my ideas for fixing that.
David Gilbert
JFreeChart Project Leader

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

Locked