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). |
|
|