Is there any way to be able to re-scale the X-axis as you zoom in?
For instance, the initial X-axis scale is by day and as you zoom in to a certain day X-axis scale becomes by hour.
I know you posted this in the Android section but I just want to make sure. This is a native Android application correct? And you are referring to the data chart control for Android?
Correct. I am referring to the Android chart controls.
I have been looking into the SamplesBrowser project but there is no example of re-scaling the X-axis. As mentioned in my first post, my scenario is to scale X-axis with dates (i.e. Jul 5, Jul 6, Jul 7...) and after zooming in on a certain date I want to see the hours (i.e. 10:00, 11:00, 12:00...) on my X-axis to have a more accurate information about my data item.
Seems like CategoryDateTimeXAxis (com.infragistics.controls.charts.CategoryDateTimeXAxis) may be the solution for my need. Could you please provide an example of its usage?
I don't want to preempt the request for a sample of usage of CategoryDateTimeXAxis, but since it is category based (fixed intervals between values on the axis with perhaps some missing) I'm not sure if that is the right tool for the use case where the x-axis is arbitrary date/time values (variable intervals). There doesn't seem to be a NumericDateTimeXAxis class, and I'm not clear if its possible to format the NumericXAxis labels as date/time values.
CategoryDateTimeXAxis might be able to be kludged into working for this by bucketing the data (and then rebucketing when the scale changes), but that is a bit messy.
Is there a better way to achieve the goal of plotting on an effectively continuous date/time x-axis?
CategoryDateTimeXAxis would actually be the correct axis to use. CategoryDateTimeXAxis is meant to render a range of dates with no specific interval between them. Only the CategoryXAxis will render the data points with a fixed interval.
I'm working on a sample to try and implement your requirements. I believe you will need to change the axis interval and label properties once a certain zoom level is reached but I don't have a code example right now. I will get back to you once I have some code to share.