Hello,
i have an .Net MAUI in which I use some awesome syncfusion Chart Controls:
The Content Page which uses the controls has the following XAML Code:
<?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"
x:Class="VideoGamePlayList.StatsPage"
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
xmlns:viewmodel="clr-namespace:VideoGamePlayList.ViewModels"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:DataType="viewmodel:StatsViewModel"
>
<Shell.TitleView>
<StackLayout Orientation="Horizontal" VerticalOptions="Center" Padding="0,0,0,0">
<Image Style="{StaticResource ToolbarIcon}"></Image>
<StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal">
<Label Text="Statistiken"
Style="{StaticResource ToolbarTitle}"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/>
</StackLayout>
</StackLayout>
</Shell.TitleView>
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="400" />
<RowDefinition Height="400" />
<RowDefinition Height="400" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}" Grid.Row="0"></ActivityIndicator>
<chart:SfCartesianChart Grid.Row="0" Grid.Column="0" x:Name="chartGamesperPlatform" WidthRequest="300" EnableSideBySideSeriesPlacement="True">
<chart:SfCartesianChart.Title>
<Label Text="Games pro Platform" Style="{StaticResource HeaderLabelStatistics}"></Label>
</chart:SfCartesianChart.Title>
<chart:SfCartesianChart.XAxes >
<chart:CategoryAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.Series>
<chart:ColumnSeries ItemsSource="{Binding VideoGamePerPlatformStatisticData}" EnableAnimation="True"
XBindingPath="Name"
YBindingPath="Value" ShowDataLabels="True">
<chart:ColumnSeries.DataLabelSettings>
<chart:CartesianDataLabelSettings LabelPlacement="Inner"/>
</chart:ColumnSeries.DataLabelSettings>
</chart:ColumnSeries>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
<chart:SfCircularChart x:Name="chartDigitalNontDigital" Grid.Row="1" Grid.Column="0" WidthRequest="300">
<chart:SfCircularChart.Title>
<Label Text="Digital / Nicht digital" Style="{StaticResource HeaderLabelStatistics}"/>
</chart:SfCircularChart.Title>
<chart:SfCircularChart.Legend>
<chart:ChartLegend IsVisible="True"/>
</chart:SfCircularChart.Legend>
<chart:SfCircularChart.Series>
<chart:PieSeries ItemsSource="{Binding VideoGameIsDigitalCountStatisticData}" EnableAnimation="True"
XBindingPath="Name"
YBindingPath="Value"
ShowDataLabels="True"
EnableTooltip="True">
</chart:PieSeries>
</chart:SfCircularChart.Series>
</chart:SfCircularChart>
<chart:SfCircularChart Grid.Row="2" Grid.Column="0" x:Name="chartFinishedStati" WidthRequest="350">
<chart:SfCircularChart.Title>
<Label Text="Abschlusstatus" Style="{StaticResource HeaderLabelStatistics}"/>
</chart:SfCircularChart.Title>
<chart:SfCircularChart.Legend>
<chart:ChartLegend/>
</chart:SfCircularChart.Legend>
<chart:SfCircularChart.Series>
<chart:DoughnutSeries ItemsSource="{Binding VideogamesFinishedStatusStatisticData}" EnableAnimation="True"
XBindingPath="Name"
YBindingPath="Value"
ShowDataLabels="True"
EnableTooltip="True">
</chart:DoughnutSeries>
</chart:SfCircularChart.Series>
</chart:SfCircularChart>
</Grid>
</ScrollView>
<ContentPage.Behaviors>
<toolkit:EventToCommandBehavior EventName="Appearing" Command="{Binding LoadCommonStatisticDataCommand}">
</toolkit:EventToCommandBehavior>
</ContentPage.Behaviors>
</ContentPage>
In the View Model the Obserable Collections are populated. The Data is coming from a locol sqlLite DB.
Here is the Code:
public partial class StatsViewModel : BaseViewModel
{
private readonly VideoGameDB _videoGameDB;
public ObservableCollection<Statistic> VideoGameIsDigitalCountStatisticData { get; set; } = new();
public ObservableCollection<Statistic> VideoGamePerPlatformStatisticData { get; set; } = new();
public ObservableCollection<Statistic> VideogamesFinishedStatusStatisticData { get; set; } = new();
public ObservableCollection<PlatformEntity> Platforms { get; set; } = new();
public ObservableCollection<Statistic> VideogameFinishedStatusPlatformStatistic { get; set; } = new();
public ObservableCollection<Statistic> VideoGameIsDigitalCountStatisticPlatform { get; set; } = new();
[ObservableProperty]
PlatformEntity selectedPlatform;
public StatsViewModel(VideoGameDB videoGameDB)
{
_videoGameDB = videoGameDB;
}
[RelayCommand]
public async Task LoadPlatformStatisticData()
{
var platforms = await _videoGameDB.GetPlatformsWithEntriesAsync();
Platforms.Clear();
foreach (var platform in platforms)
{
Platforms.Add(platform);
}
}
[RelayCommand]
public async Task LoadCommonStatisticData()
{
IsBusy = true;
var statsIsDigital = await _videoGameDB.GetStatsVideogamesDigitalOrNotDigital();
VideoGameIsDigitalCountStatisticData.Clear();
foreach (var s in statsIsDigital)
{
if (s.Name.Equals("1"))
s.Name = "Digital";
else
s.Name = "Physisch";
VideoGameIsDigitalCountStatisticData.Add(s);
}
var statsPlatformCountGames = await _videoGameDB.GetStatsPlatformCountGames();
VideoGamePerPlatformStatisticData.Clear();
foreach (var s in statsPlatformCountGames)
VideoGamePerPlatformStatisticData.Add(s);
var statisticsFinishedStatus = await _videoGameDB.GetStatsFinishedStatus();
VideogamesFinishedStatusStatisticData.Clear();
foreach (var s in statisticsFinishedStatus)
{
VideogamesFinishedStatusStatisticData.Add(s);
}
IsBusy = false;
}
[RelayCommand]
public async Task SelectedPlatformChanged()
{
IsBusy= true;
var statisticsFinishedStatus = await _videoGameDB.GetStatsFinishedStatusPerPlatform(SelectedPlatform.ID);
VideogameFinishedStatusPlatformStatistic.Clear();
foreach (var s in statisticsFinishedStatus)
{
VideogameFinishedStatusPlatformStatistic.Add(s);
}
var statDigital = await _videoGameDB.GetStatsVideogamesDigitalOrNotDigitalPerPlatform(SelectedPlatform.ID);
VideoGameIsDigitalCountStatisticPlatform.Clear();
foreach (var s in statDigital)
{
VideoGameIsDigitalCountStatisticPlatform.Add(s);
}
IsBusy = false;
}
}
}
On Windows it works. But the Legend is showing after reloading (not when loading the first Time).
On Android emulator the legends (Pie Charts) are missing. On my Android Tab s7 FE no chart is shown. Only the header text is shown.
I've not tested on Apple devices.
Sorry for my bad english and thx for your great work.
greetings
Sascha
I want to add that I use .NET 7.0 as Target Framework.
Hi Sascha Ingenohl,
Thank you for bringing this issue to our attention. We have resolved the chart hiding and legend hiding issues you reported and have created a custom patch with the fix, which is compatible with Essential Studio version 20.4.0.38. The patch can be downloaded from the following locations:
Patch Exe link:
https://syncfusion.com/Installs/support/patch/20.4.0.38/1518922/F179851/SyncfusionPatch_20.4.0.38_1518922_1092023065019572_F179851.exe
Patch NuGet link:
https://syncfusion.com/Installs/support/patch/20.4.0.38/1518922/F179851/SyncfusionNuget_20.4.0.38_1518922_1092023065019572_F179851.zip
Disclaimer:
Please note that we have created this patch for version 20.4.0.38 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.
Please clear the NuGet cache, before using the latest one.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
The fix for the reported issues will be included in our upcoming weekly NuGet release, which is expected to roll out on January 10, 2023.
Regards,
Raja.
Hello,
thx your for your fast Reply. I've installed the gnu package Version
20.4.43 of Syncfusion.Maui.Charts . Unfortunately it is still not working.
Greetings
Hi Sascha
We appreciate the time and effort you took to test the patch. We will investigate the problem and work to identify the root cause. We will keep you informed of our progress and provide you with an update on the timeline for a fix, along with validation status, on or before January 13th, 2023.
Regards,
Raja.
Hi Sascha,
We are validating the issue and suspect the issue is with the framework collection view. Please follow the below feedback, and we will try to move the fix into the January 31st Weekly NuGet.
We appreciate your patience until then. If you have any further concerns, please let us know.
Regards,
Raja.
Thx you for your reply. I've not mentioned one thing. Maybe it helps. When I rotate the tablet the legend is showing, but the chart is always not visible!
Hi Sascha,
Thanks for the information. We are working on the solution and will keep you updated on our progress.
Best Regards,
Raja.
Hello,
I've installed the gnu package Version 20.4.48 of Syncfusion.Maui.Charts.
It is still not working. On the tablet nothing (except the Header ) is shown. On my Smartphone the legend is not shown.
Greetings
Dear Sascha,
We apologize for any inconvenience caused. The fix for the reported issue has not been included in the current SP release. This issue occurs randomly only on the Android platform. However, we have already fixed this issue for .NET 6 projects and are actively working on a solution for .NET 7. The fix will be included in our Volume 1 release, 2023.
Best regards,
Raja.
Ok. Thx for the information.
With the latest Version 20.4.48 there is the same issue. When is the Volumne 1 release date?
Greetings
Hi Sascha,
As this is a framework-level issue, our team has tried a workaround, which has been tested and found to be working. This temporary solution will be included in our upcoming weekly NuGet release, which is expected to roll out on February 14, 2023. We will keep you informed once the release is available.
Additionally, please note that the Volume 1 release is expected to be released on March 21,2023.
Best regards,
Raja.
Hi Sascha,
We are glad to announce that our latest weekly NuGet V20.4.0.50 is rolled out and is available for download and this version includes the fix for the ‘Circular chart rendering’ issue.
We highly recommend clearing your cache before using the latest release, you can find a guide on how to do this at https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
We appreciate your support and thank you for your patience during this process. Please let us know if you again face the issue using this fix.
Best Regards,
Raja.
Hello,
i have installed the newest Version and cleared the nuget cache. Unfortunately it doesn't help. I've the same issues.
On the tablet no Diagram (only the header is shown) and on Phone no legend is shown.
I've no idea what i'am missing.
Greetings
Hi Sascha,
As we have previously mentioned, this is only a temporary solution. We have tested the fix multiple times on various devices and have confirmed that it is working.
We would like to investigate the issue further to provide you with a better solution. Could you please provide us with the details of your device configuration? This will help us ensure the fix works on your device as well.
Additionally, we have prepared a sample based on the code you shared. Please modify this sample and share an issue-reproducing sample with us.
Best Regards,
Raja.
Thx for your patience. This sample has the same issues: No chart is showing on tablet and on phone the legend is not shown. This project uses the not the newest version of synfusion charts. I wonder if thats a problem.
What do you mean with details of the device configuration?
Greetings and thx for your support
Hi Sascha,
Thank you for taking the time to test the sample. We have fixed the issue in version (20.4.0.49). We tested it on multiple devices, including high configuration tablets, and it worked fine. However, we understand that the issue occurs randomly on some devices. We will continue investigating and will update you on the status by Monday, Feb 27, 2023.
Regards,
Raja.
Hi Sascha,
We have tested the fix and the fix works for all cases on highly configured devices. As such, we are unable to determine the cause of the issue. If you have any additional information that could help us identify the cause, please let us know.
Regards,
Raja.
Hello,
i've tried the newest release. Still the same issue. Hm I'am out of ideas what i can try.
Greetings
Hi Sascha,
Sorry for the continuous delay. This problem occurs at random, and we have not
been able to reproduce it with any devices on our end. As we are working in the
background on this fix, we will keep you updated. We have shared with you a
sample. Please review it and let us know if it requires any specific changes
based on your issue reproducing scenario.
Regards,
Raja.
Hello,
it is still not working with current Version 20.4.53.
I have two problems. On my Android Tablet nothing except the Header is shown. On my Android Phones no Legend is shown. I target Version the following android
net7.0-android33.0.
Could this be an issue?
Greetings and thx for your patienc
Hello Sascha,
We would like to inform you that we have conducted tests on various devices, including tablets, but we have not been able to replicate the problem so far. We will continue to investigate and provide you with an update on our progress within three business days by Wednesday, Mar 15, 2023. If necessary, we can schedule a meeting with you to review the issue.
Best regards,
Raja.
Hi Sascha,
Since we were unable to replicate the issue you reported, we would like to arrange a meeting with you to investigate and validate the problem further. Therefore, we have created a ticket under your account for this purpose.
Please follow the ticket for any further updates regarding the issue.
Best regards,
Raja.