Hi Team,
Currently on Android, the Chart renderers do not setup the XValueBinding and YValueBinding correctly if the property name is a nested property. This results in an UnhandledException at runtime
You can reproduce the issue using .NET MAUI RC2 and Telerik UI for MAUI 0.8.0, with the following implementation:
XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:telerikChart="clr-namespace:Telerik.XamarinForms.Chart;assembly=Telerik.Maui.Controls.Compatibility"
x:Class="MauiApp1.MainPage">
<telerikChart:RadCartesianChart MinimumHeightRequest="300">
<telerikChart:RadCartesianChart.HorizontalAxis>
<telerikChart:NumericalAxis LabelFitMode="MultiLine" />
</telerikChart:RadCartesianChart.HorizontalAxis>
<telerikChart:RadCartesianChart.VerticalAxis>
<telerikChart:NumericalAxis />
</telerikChart:RadCartesianChart.VerticalAxis>
<telerikChart:RadCartesianChart.Series>
<telerikChart:ScatterSplineSeries XValueBinding="NumericalData.XData" YValueBinding="NumericalData.YData" ItemsSource="{Binding Data1}" />
</telerikChart:RadCartesianChart.Series>
</telerikChart:RadCartesianChart>
</ContentPage>
Code-behind
namespace MauiApp1;
using System.Collections.ObjectModel;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
Data1 = GetNumericData1();
BindingContext = this;
}
public ObservableCollection<Item> Data1 { get; set; }
public static ObservableCollection<Item> GetNumericData1()
{
var data = new ObservableCollection<Item>
{
new Item { NumericalData = new NumericalData { XData = 2, YData = 13 } },
new Item { NumericalData = new NumericalData { XData = 19, YData = 31 } },
new Item { NumericalData = new NumericalData { XData = 22, YData = 33 } },
new Item { NumericalData = new NumericalData { XData = 28, YData = 35 } },
new Item { NumericalData = new NumericalData { XData = 33, YData = 46 } },
new Item { NumericalData = new NumericalData { XData = 38, YData = 34 } },
new Item { NumericalData = new NumericalData { XData = 49, YData = 66 } },
new Item { NumericalData = new NumericalData { XData = 55, YData = 24 } },
new Item { NumericalData = new NumericalData { XData = 62, YData = 41 } },
};
return data;
}
}
public class NumericalData
{
public double XData { get; set; }
public double YData { get; set; }
}
public class Item
{
public NumericalData NumericalData { get; set; }
}
Thank you!
Martin
The VisibleRange property can hold the actual visible minimum and maximum of the axis while the chart is being zoomed and panned.
Let's say I set the number of labels to 4 on that axis (see attached pic). It would then be up to the axis to auto generate the labels depending on the data and zoom. There would always be four labels shown on the axis regardless of zoom so the user could always have context regardless of the zoom. The labels would just change to reflect what is currently being viewed at the current zoom level.
Hi Team,
If you create a ScatterPointSeries, the RadLegend does not pick up the series DisplayName value. A replication project is attached, but here's a screenshot to quickly illustrate the behavior:
Thank you,
Marion
when using the flowing setup:
<telerik:RadCartesianChart.ChartBehaviors>
<telerik:ChartSelectionBehavior x:Name="selection"
SeriesSelectionMode="None"
DataPointSelectionMode="Single"
SelectionChanged="selection_SelectionChanged"/>
</telerik:RadCartesianChart.ChartBehaviors>
the selection behavior on data point does not fire on WInUI on Cartesian series. It works for PieSeries.
Labels in bar series are cut, when setting the labels VerticalAligment to Top:
On some chart series like, bar, line, scatter line, etc, the y axis line is hidden. make it visible, as it is on Android and Windows.
Current solution is to use the chart handler changed and set YAxis.Style.LineHidden to false.
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
this.chart.HandlerChanged += this.Chart_HandlerChanged;
}
private void Chart_HandlerChanged(object sender, EventArgs e)
{
this.UpdateChart();
}
private void UpdateChart()
{
var platformView = this.chart.Handler.PlatformView;
#if IOS || MACCATALYST
var platformChart = (Telerik.Maui.Controls.Compatibility.ChartRenderer.iOS.TKExtendedChart)platformView;
platformChart.YAxis.Style.LineHidden = false;
#endif
}
}
Hi
I have the following chart
<telerik:RadPieChart Grid.Row="1">
<telerik:RadPieChart.Series>
<telerik:DonutSeries ItemsSource="{Binding CurrencyAllocation}" x:Name="CurrSeries"
LabelBinding="Item1"
ValueBinding="Item2"
ShowLabels="True"
AllowSelect="True"
SelectedPointOffset="0.1"/>
</telerik:RadPieChart.Series>
<telerik:RadPieChart.ChartBehaviors>
<telerik:ChartSelectionBehavior DataPointSelectionMode="Single"
SeriesSelectionMode="None"
SelectionChanged="Chart_SelectionChanged" />
</telerik:RadPieChart.ChartBehaviors>
</telerik:RadPieChart>
As soon as I set the SelectedDataPointOffset to a lowish value, no matter whether it's 0.5, 0.1, 0.01, 0.001 or even 0.0000001, the offset when selecting the data point is always the same and it's so large that it's unusable, as you can see in the following screenshot.
As an additional issue, if i set the offset to 0.9, i get an exception
'RelativeOffsetFromCenter is not valid! The possible values are in the [0, 1] interval.'
as soon as I select a segment. 0.9 obviously is in the [0, 1] interval.
On WinUI: Two PieSeries are displayed.
On Android: Crash occurs
On iOS: negative value is displayed in chart
Improve performance when adding many series and data points are constantly added and increased
For example chart slows the performance when 4th series with many data points are added.
For the test, I have used ScatterLine series.
The data points should allow setting shape and color to each one individually.