Open PickleBurg opened 1 month ago
Same issue. I thought I was crazy lol Sadly no solution yet
I got one solution working (or at least a workaround) tested on Donut Charts and line charts (probably works on all) So Here is what I do;
private async void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
{
var send = (FlexLayout)sender;
var song = send.BindingContext as SingleSongStatistics;
if (song is null)
{
return;
}
HomePageVM.ShowSingleSongStatsCommand.Execute(song.Song); // method to update chart
LineChartBor.WidthRequest = LineChartBor.Width + 1; //LineChartBor is the border that has my chart
await Task.Delay(250);
LineChartBor.WidthRequest = LineChartBor.Width - 1;
}
My XAML looks like this
<Border x:Name="LineChartBor" HeightRequest="400"
Stroke="DarkSlateBlue"
StrokeShape="RoundRectangle 15">
<mc:ChartView Chart="{Binding LChart}"
/>
</Border>
Hope that helps !
I'm definitely going to give this a go I'll let you know!!
I have encountered an interesting issue while attempting to create a line chart that I expect to update every second with a new value.
this does work and renders on the screen. the issue I have is when I notify a property change the new chart shows but the old ones does not disappear unless I resize the window of the application.
https://github.com/PickleBurg/ImageSource-Memory-Leak/tree/chart-stuff
code repo for anyone interested.
It starts to increase in the amout of charts present
Them i resize andd it shows less.