Hi,
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.
Thanks.
Hello Elton,
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?
Hi Rob,
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?
Michael,
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.
Elton,
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.
Hi Harinder,
The CategoryDateTimeXAxis issue was resolved in the 14.2 CTP release. Originally this issue was reported in the 14.1 CTP. You can download the 14.2 CTP for Android here.
Hi !!
We too are facing the same issue. Do we have a solution to it?
if yes, in which release?if no, when should we expect it?
Thanks !!
Harinder.
There appears to be an issue when using the CategoryDateTimeXAxis which is blocking its use. Unfortunately this means it cannot be used at this time. I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 176048.
The basic gist of the approach, though, would have been to use the setOnActualWindowRectChangedListener to listen for window rect changes that occur when zooming. And then inside the handler you could use the chart's getWindowScaleHorizontal() and getWindowScaleVertical() functions to check the zoom level and based on this zoom level you can change the X axis' interval and label. Since the CategoryDateTimeXAxis is not working, I can't give you a sample demonstrating this.
I have created a private case for you so that you can track the progress of the development issue. The case number is CAS-140345-H7W2F9 and you can access it here: https://ko.infragistics.com/my-account/support-activity
Hi Elton,
I ran into a snag while modifying a CategoryXAxis sample to CategoryDateTimeXAxis. I sent our developers an email about this which I am currently waiting for a response. I apologize for the delay.
Hi Rob, I was wondering if you were able to put together some example of CategoryDateTimeXAxis usage. I think just a simple example of CategoryDateTimeXAxis would be enough for us to start, and we can work later on changing the labels while zooming.