Hi,
I have medical data displaying every 1s with Date as XAxis and ml/hr as YAxis. I want to control the display to let say, 6hr window in the current display by default whereas zoom-in can go to precisely 1hr and not below that and zoom-out reset to 6hr. How can I achieve this?
FYI, my data retention is for 72hrs.
BR,
Praween K.
- Praween Kumar asked 6 years ago
-
FYI, my trial license extended for another month for evaluation of this library.
- You must login to post comments
Hi Praween,
Have you tried to set VisibleRange for your xAxis? This should give you direct control over what should be displayed by chart. If you want to restrict zoom with modifiers you can use our Minimal/MaximumZoomConstrain:
xAxis.setMinimalZoomConstrain(DateIntervalUtil.fromHours(1));
xAxis.setMaximumZoomConstrain(DateIntervalUtil.fromHours(6));
Is this suitable for your needs?
Best regards,
Yura
- Yura Khariton answered 6 years ago
- You must login to post comments
Hi Yura,
Is it also possible to change these settings runtime based on some widget event, let say, i want to change the max zoom constrain from 6hr -> 12hr. How will I update the graph view with this API refreshxAxis.setMaximumZoomConstrain(DateIntervalUtil.fromHours(12)) ?
BR,
Praween
- Praween Kumar answered 6 years ago
-
Well this should be easy. Have you tried to place code above into listener implementation (e.g. in OnClickListener or some other listener which provided by View which you use )? Of course you’ll need to pass axis instance into listener.
- You must login to post comments
Please login first to submit.