You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have been trying to figure this out for over two days, but I haven't been able to. I downloaded the master version, but I still couldn't resolve the issue. It works fine on Android, but I can't figure it out on Windows.
I even tried creating a clean project, and I'm experiencing the same problem. I have attached the simple project based on the documentation. I would appreciate it if anyone could clarify what I am doing wrong.
To make the chart appear, modify any line in the XAML file, restore it, and then click on Hot Reload. Otherwise, it won't work.
Code Below App.xaml.cs
`
namespace LiveCharts2
{
public partial class App : Application
{
public App()
{
InitializeComponent();
//MainPage = new AppShell();
MainPage = new Chart();
}
}
}
`
ViewModel.cs
`using LiveChartsCore.SkiaSharpView.Drawing.Geometries;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiveCharts2
{
public class ViewModel
{
public ISeries[] Series { get; set; } = [
new ColumnSeries(3, 4, 2),
new ColumnSeries(4, 2, 6),
new ColumnSeries<double, DiamondGeometry>(4, 3, 4)
];
}
} **Chart.xaml**
Describe the bug
I have been trying to figure this out for over two days, but I haven't been able to. I downloaded the master version, but I still couldn't resolve the issue. It works fine on Android, but I can't figure it out on Windows.
I even tried creating a clean project, and I'm experiencing the same problem. I have attached the simple project based on the documentation. I would appreciate it if anyone could clarify what I am doing wrong.
To make the chart appear, modify any line in the XAML file, restore it, and then click on Hot Reload. Otherwise, it won't work.
Code Below
App.xaml.cs
`
namespace LiveCharts2
{
public partial class App : Application
{
public App()
{
InitializeComponent();
}
`
ViewModel.cs
`using LiveChartsCore.SkiaSharpView.Drawing.Geometries;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiveCharts2
{
public class ViewModel
{
public ISeries[] Series { get; set; } = [
new ColumnSeries(3, 4, 2),
new ColumnSeries(4, 2, 6),
new ColumnSeries<double, DiamondGeometry>(4, 3, 4)
];
}
}
**Chart.xaml**
<ContentPage.BindingContext>
local:ViewModel/
</ContentPage.BindingContext>
<ContentPage.Content>
<lvc:CartesianChart
Series="{Binding Series}">
</lvc:CartesianChart>
</ContentPage.Content>
`
Chart.xaml.cs
`namespace LiveCharts2;
public partial class Chart : ContentPage
{
public Chart()
{
InitializeComponent();
}
}`
Desktop
Smartphone
The text was updated successfully, but these errors were encountered: