beto-rodriguez / LiveCharts2

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.

Home Page:https://livecharts.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UWP install from NuGet

polymorphicshade opened this issue · comments

commented

Browsing https://nuget.info/packages/LiveChartsCore.SkiaSharpView.UWP/2.0.0-beta.40 shows no binaries I can use in my UWP project.

Am I missing something? When I try to use this nuget package in my Visual Studio project, I'm unable to use any LiveChart controls in the XAML and I cannot compile successfully.

The package is missing the dependency to the core packages, I'll fix in the next release, for now please try to install the core manually.

https://www.nuget.org/packages/LiveChartsCore.SkiaSharpView/2.0.0-beta.40

Or clone this repo and add the reference to your project.

commented

Thanks that seemed to work for now... but the designer is giving me issues (may or may not be related to me referencing the projects manually):

image

Things do show up fine at runtime.

I wasn't able to add LiveChartsCore and LiveChartsCore.SkiaSharpView to my UWP project through the Visual Studio UI, but I had to manually add them in the .csproj file.

Should be fixed with 1c7f4ec

I will test, then close if it works.

I made the NuGet package work following the next steps:

  1. Install at least beta.57
  2. Install manually the dependencies (I am not sure why they are not getting installed automatically)

image

  1. Finally when the app starts, in the App.xaml file, at the OnLaunched method, add the following line:

LiveCharts.Configure(config => config.AddDefaultMappers().AddSkiaSharp().AddLightTheme());

This works for now, but this should be improved in a future version.

commented

@beto-rodriguez I tried out the latest beta.60 and everything seems to be working fine so far! 😊 No crashing or designer issues at the moment. Though like you mentioned, I needed to install LiveChartsCore and LiveChartsCore.SkiaSharpView manually.

I didn't need to add that piece of code to App.xaml.cs, but I'll keep that code in mind if I run into any issues.

I was using the core of livecharts 1, how crazy to confuse LiveCharts.Core with LiveChartsCore

@beto-rodriguez I'm trying the library on a WinUI3 app, but I'm getting the "missing .xbf file" errors when building the code:
error MSB3030: Could not copy the file "C:\Users\rualvesm.nuget\packages\livechartscore.skiasharpview.winui\2.0.0-beta.70\lib\net5.0-windows10.0.19041\LiveChartsCore.SkiaSharpView.WinUI\DefaultTooltip.xbf" because it was not found.

Any chance you've seen this before?

@rubenseam for WinUI3 please install the WinUI 3 package:

LiveChartsCore.SkiaSharpView.WinUI

WinUI (WinUI3) is so different from WinUI2.

https://docs.microsoft.com/en-us/windows/apps/winui/

Sorry, @beto-rodriguez , I'm not sure which packages I should install. I do have WinUI3 set up for my application.
image
Should I try and install some specific version of LiveCharts/SkiaSharp?

@rubenseam WinUI3 is not related to UWP.

The packages you installed seem right.

Take a look at the sample that is running on WinUI in this repo:

https://github.com/beto-rodriguez/LiveCharts2/tree/master/samples/WinUISample/WinUI

this issue is gone in beta.80 package, for both WinUI and UWP.