Hi Team,
If you set the PanOffset in XAML, it is not applied.
Does not work:
<telerikChart:RadCartesianChart x:Name="MyChart" Zoom="2, 1" PanOffset="-400,0" >
I would expect that the RadChartView renderer would be responsible for handling this after the control is loaded and the series/axis is rendered (see workaround).
If I subscribe to the ChartView's NativeControlLoaded event and wait approx 100ms before calling PanOffset, it will work.
e.g.
<telerikChart:RadCartesianChart x:Name="MyChart" Zoom="2, 1"
NativeControlLoaded="MyChart_OnNativeControlLoaded">
private async void MyChart_OnNativeControlLoaded(object sender, EventArgs e)
{
await Task.Delay(100);
MyChart.PanOffset = new Point(-400, 0);
}
The takeaway, and basis of this Bug Report, is that the control should internally perform this delay check and set the PanOffset.
This will enable MVVM scenarios because (I originally wanted to bind the PanOffset value from my view model).
Thank you,
Ramakant