Hi there,
I would like to have support for selecting a slice of the piechart from code-behind. I have have looked into the chart and series properties but found no selectable datapoints property. The chartSelectionBehavior offers a ClearSelection method and the readonly SelectedPoints property, but nothing to add a selected point.
As of the latest release (10/04/2019) RadPieChart with a PieSeries having LabelBinding set to a property name, and ShowLabels set to True, with the list of data bound to ItemsSource containing one or more empty pie slices (a null in the list), causes a System.Reflection.TargetException to be thrown on load of the page containing the chart in iOS (this scenario works fine in UWP).
I am using the latest available Visual Studio 2019 (16.3.5) and the latest available Xamarin.Forms package (4.2.0.848062) and testing on an iPad with iOS 13.1. The reason I need to have a null value in the list is so that the custom color palette I'm applying will always apply the same colors to the same data points (pie slices), even though in some cases, zero or one or two of the three pie slices will have no data value (and so should not appear in the chart, but still "use up" the corresponding color in the 3 colors of the palette).
In the 08/02/2019 release, this scenario worked fine in iOS (the 09/13/2019 release had the https://feedback.telerik.com/xamarin/1431067-chart-ios-invalidcastexception-is-thrown-when-the-chart-is-loaded issue, which is now resolved in the 10/04/2019 release, but which prevented my testing in iOS since in my app I had RadCartesianCharts on the same pages as the RadPieCharts).
The newly broken functionality in iOS could possibly be related to two other items that are marked completed:
https://feedback.telerik.com/xamarin/1366403-piechart-tooltip-behavior-is-not-working-properly (in 10/04/2019 release)
https://feedback.telerik.com/xamarin/1365842-chart-null-value-support (in R3 2018 SP release)
An exception is thrown on Android when this code is executed
this.chart1.VerticalAxis = new NumericalAxis { Minimum = 300, Maximum = 400 };
this.chart1.VerticalAxis = new NumericalAxis { Minimum = 100, Maximum = 200 };
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
When you zoom in on the graph, it always zooms to the center of the dataset. Even if I try to move, manually, horizontally the graph I lose the position when a point is added.
When point is added and chart is zoomed, cannot scroll to see other data, the chart reset the data visualization from the beginning.