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.
https://livecharts.dev
MIT License
4.37k stars 570 forks source link

Installation #29

Closed jamsoft closed 3 years ago

jamsoft commented 3 years ago

Describe the bug

What the recommended way of consuming this library at the moment? I can't seem to find any NuGets and the solution doesn't build at the moment. It's looking for C:\Users\beto ...

I think all the other build errors are due to this one.

Desktop (please complete the following information):

beto-rodriguez commented 3 years ago

Which file caused the issue? is everything working now?

jamsoft commented 3 years ago

Actually I just changed the path in the project properties but it seems there are a few other instances where it's looking for files in your local user directory.

beto-rodriguez commented 3 years ago

it seems that the documentation file is pointing to my pc:

<DocumentationFile>C:\Users\Beto\source\repos\LiveCharts\src\skiasharp\LiveChartsCore.SkiaSharp.Avalonia\LiveChartsCore.SkiaSharpView.Avalonia.xml</DocumentationFile>

https://github.com/beto-rodriguez/LiveCharts2/search?q=beto%2F

for now, try to uncheck it, from vs project properties

image

or just remove the DocuimentationFile element, it is not required to compile the project

jamsoft commented 3 years ago

Yeah, I dealt with those it's the 667 other compiler errors and code issues ReSharper is reporting that has me stumped at the moment.

Just opening the solution has a stack of errors before even running a build. Is there an environment setup document I've completely missed?

An example is in CartesianChart VS cannot resolve ICartesianChartView and ReSharper wants to import using LiveChartsCore.Kernel; namespace in order to resolve it.

That same file has using LiveChartsCore.Context; as a namespace which cannot be resolved.

I think these might all be misleading. They all seem to be related to the Uno projects. As far as I know there isn't any specific tooling to install to get Uno running and I have all the Uno prerequisites installed already.

Not sure what to check next to be honest.

beto-rodriguez commented 3 years ago

Please unload the Uno Project, it is paused by now

jamsoft commented 3 years ago

Ahhhhhhhhhh, will try.

jamsoft commented 3 years ago

BTW, this is such a great library. So glad to see it developed!

beto-rodriguez commented 3 years ago

This is how it looks for me:

image

Please let me know if you were able to make it run, so I can fix it also.

jamsoft commented 3 years ago

Hmm ... same build issues.

In LiveChartsCore.AvaloniaView.CartesianChart

using LiveChartsCore.Context; is erroring as unresolvable as is ICartesianChartView VS/ReSharper wants to import using LiveChartsCore.Kernel;

When I allow it, it adds two namespaces:

using LiveChartsCore.Kernel;
using LiveChartsCore.Measure;

Even after importing that namespace, the var stylesBuilder = LiveCharts.CurrentSettings.GetStylesBuilder<AvaloniaDrawingContext>(); line cannot resolve the GetStylesBuilder method.

All very odd.

beto-rodriguez commented 3 years ago

sorry, also please remove the obsolete avalonia view

image

Need to clean the repo!

jamsoft commented 3 years ago

Oh arses ... I was looking to use this on AvaloniaUI project.

beto-rodriguez commented 3 years ago

It is working on Avalonia, just that view is obsolete, currently I am using the LiveChartsCore.SkiaSharpView.Avalonia project

jamsoft commented 3 years ago

SWEEEEEEEEEEEEEEEEEEEEET!!!! :)

I use 0.9.7 in a .NET Framework so finding this working in AvaloniaUI is just fantastic. Is the Avalonia sample up to date?

beto-rodriguez commented 3 years ago

Yes Avalonia samples are updated

jamsoft commented 3 years ago

Dude, you get a ROCKET!!! :)

jamsoft commented 3 years ago

IT BUILDS!

So I've removed

LiveCharts2\samples\UnoSample\UnoSample.Droid\UnoSample.Droid.csproj LiveCharts2\samples\UnoSample\UnoSample.iOS\UnoSample.iOS.csproj LiveCharts2\samples\UnoSample\UnoSample.macOS\UnoSample.macOS.csproj LiveCharts2\samples\UnoSample\UnoSample.Skia.Gtk\UnoSample.Skia.Gtk.csproj LiveCharts2\samples\UnoSample\UnoSample.Skia.Tizen\UnoSample.Skia.Tizen.csproj LiveCharts2\samples\UnoSample\UnoSample.Skia.Wpf\UnoSample.Skia.Wpf.csproj LiveCharts2\samples\UnoSample\UnoSample.Skia.Wpf.Host\UnoSample.Skia.Wpf.Host.csproj LiveCharts2\samples\UnoSample\UnoSample.UWP\UnoSample.UWP.csproj LiveCharts2\samples\UnoSample\UnoSample.Wasm\UnoSample.Wasm.csproj LiveCharts2\samples\UnoSample\UnoSample.Shared\UnoSample.Shared.shproj LiveCharts2\src\avalonia\LiveChartsCore.AvaloniaView\LiveChartsCore.AvaloniaView.csproj LiveCharts2\src\skiasharp\LiveChartsCore.SkiaSharp.Avalonia\LiveChartsCore.SkiaSharpView.Avalonia.csproj LiveCharts2\src\skiasharp\LiveChartsCore.SkiaSharpView.Uno\LiveChartsCore.SkiaSharpView.Uno.csproj

And it's now building fine. Thanks!

jamsoft commented 3 years ago

I can do a PR if you like?

jamsoft commented 3 years ago

AppShell Xaml also has a reference to a missing namespace XamarinSample.Views

beto-rodriguez commented 3 years ago

The PR would help.

Are you familiar with SkiaSharp/Avalonia? The obsolete Avalonia view is there because I am not sure if Avalonia will now only work with SkiaSharp. The current view requires Avalonia to run on SkiaSharp, while the "Obsolete view" does not depend on SkiaSharp.

You can also safely remove that missing namespace in the Xamarin project, I am not sure why it is asking for it, also Xamarin samples should be up to date.

jamsoft commented 3 years ago

Just did the PR. I've just this weekend picked up AvaloniaUI for a dashboard project. Hence looking for Avalonia compatible charts so I'm very new to it.

Skia I've used on Xamarin projects and wotnot.

beto-rodriguez commented 3 years ago

Fixed with #30 and 1114d50320f6c20090abe95eabc0674d162883ca, 6e1ac95194abee57e2dba1aa2ff8ff8eb40b09fd, 331de94dda185d56d4da283bc32c3147a8e6d0b4, d509f838fdca770dd93df2d34d2e8bcde2352b30