Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Major and Minor Ticks on Time based x-axis

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
martin.rooney Posted - 04 Oct 2011 : 09:55:22
From what I have seen this does not look possible, but I have had a request for the following:
- graphs are displayed with time on the x-axis
- displayed graphs can be viewed at various resolutions e.g. 30min, 1h, 1h30 2h, etc.
- for each resolution:
- 4 major ticks
- 3 minor ticks per major tick

This would result in many of the ticks corresponding to fractions of minutes.

I have looked at method setAxisTickMarkTimeBase and it looks like there are a fixed set of constants that can be passed in here.
Is there an alternative to this that would allow this scheme to be implemented?
2   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 04 Oct 2011 : 12:33:16
If you do not need absolute time/date, and can use just elapsed time, you should be able to do what you want using ElapsedTimeCoordinates, ElpasedTimeAxis and ElapsedTimeAxisLabels. See the example NewDemosRev2.ElapsedTimeChart. You can set the tick marks the same as the linear axis example above.

ElapsedTimeAxis xAxis = new ElapsedTimeAxis(pTransform1, ChartObj.X_AXIS);
xAxis.setAxisTickSpace( (pTransform1.getScaleMaxX()- pTransform1.getScaleMinX())/12);
xAxis.setAxisMinorTicksPerMajor(3);
chartVu.addChartObject(xAxis);

The tick mark settings will not stick if you use zooming. So you will need to select different axis ranges some other way (buttons, or menu selection)
quinncurtis Posted - 04 Oct 2011 : 10:45:34
I don't see any way to do it using TimeCoordinates and a TimeAxis. The time axes must fit one of our preset formats.

You could use CartesianCoordinates, LinearScale and NumericAxisLabels. Just scale the linear x-axis for minutes. You can easily set that up for 4 major tick marks, with 3 minor in between.

xAxis.setAxisTickSpace( (pTransform1.getScaleMaxX()- pTransform1.getScaleMinX())/12);
xAxis.setAxisMinorTicksPerMajor(3);

You would see a numeric axis labels (90.0 for 90 minutes) instead of the time formatted axis labels (1:30).

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07