Hi all,
I have two or more charts on the same page and I want to sync them at the same x value when the user pan left/right or zoom in/out.
If I use ActualWindowRectChanged the result is correct. But what is the difference between these two public events ActualWindowRectChanged and WindowRectChanged on Xamarin Forms?
Thank you for your support.Joseph
Hello Joseph,
The difference between the ActualWindowRect and WindowRect properties on the Xamarin.Forms XamDataChart is mostly negligible if you are using the traditional charts, but is much more noticeable when using things like the Radial and Polar charts.
Essentially, the "Actual" window rect is the coerced and adjusted viewport based on the aspect ratio of the device the chart is running on. The WindowRect is the "requested" viewport, but this request may not be valid for the device's pixel aspect ratio and may be adjusted to scale to the ActualWindowRect.
As an aside, if you are looking to synchronize the XamDataChart with other charts, you should consider using the SyncChannel and SynchronizeHorizontally/Vertically properties of the charts. The SyncChannel lets you define a "channel" string that all charts with that same string will synchronize to either horizontally or vertically based on the values of the SynchronizeHorizontally/Vertically properties.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewSoftware Developer
Thank you for your clarification, but are you sure that SyncChannel is currently supported on Xamarin Forms? I've seen this thread:https://www.infragistics.com/community/forums/f/ultimate-ui-for-xamarin/111495/chart-synchronization-with-xamarin-formsIt would be a great solution...
After closer inspection, it does appear that the SyncChannel is not yet implemented on the Infragistics for Xamarin.Forms XamDataChart. I apologize for that oversight on my part. As such, I would recommend continuing with the ActualWindowRectChanged solution that you are currently working with.
If you would like to express interest in the SyncChannel-related properties for the XamDataChart, I would recommend getting in contact with our product management teams using the ideas@infragistics.com e-mail as mentioned in the forum thread you have linked. This will place you in direct communication with the teams who plan and prioritize upcoming features and development based on community and user feedback.
Ok Andrew, thank you.