Skip to content

Commit

Permalink
Merge pull request #1276 from beto-rodriguez/dev
Browse files Browse the repository at this point in the history
RC1.1
  • Loading branch information
beto-rodriguez authored Sep 25, 2023
2 parents 36ff845 + cbf0159 commit f26a3b3
Show file tree
Hide file tree
Showing 31 changed files with 115 additions and 96 deletions.
5 changes: 3 additions & 2 deletions build/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ param([string]$configuration = "Debug", [string]$nupkgOutputPath = "./nupkg")
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharp.Xamarin.Forms/LiveChartsCore.SkiaSharpView.Xamarin.Forms.csproj")
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Blazor/LiveChartsCore.SkiaSharpView.Blazor.csproj")
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Eto/LiveChartsCore.SkiaSharpView.Eto.csproj")
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Maui/LiveChartsCore.SkiaSharpView.Maui.csproj")
[Project]::new("./src/LiveChartsCore.Behaviours/LiveChartsCore.Behaviours.csproj", $true)
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Maui/LiveChartsCore.SkiaSharpView.Maui.csproj", $true)
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Uno/LiveChartsCore.SkiaSharpView.Uno.csproj", $true)
[Project]::new("./src/skiasharp/LiveChartsCore.SkiaSharpView.Uno.WinUI/LiveChartsCore.SkiaSharpView.Uno.WinUI.csproj", $true)
[Project]::new(
Expand Down Expand Up @@ -102,7 +103,7 @@ function Add-Pack {
}

if ($project.packingMethod -eq "msbuild") {
& $msbuild $project.src -t:pack /p:configuration=$configuration
& $msbuild $project.src -t:pack /p:configuration=$configuration /restore

$folder = $project.GetFolder()

Expand Down
2 changes: 1 addition & 1 deletion samples/BlazorSample/Pages/Axes/LabelsFormat2.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

protected async override Task OnInitializedAsync()
{
// On .net7, SkiaSharp 2.88.5 and SkiaSharp.HarfBuzz 2.88.5 the MatchCharacter does not load the font.
// On .net7, SkiaSharp 2.88.6 and SkiaSharp.HarfBuzz 2.88.6 the MatchCharacter does not load the font.
// The MatchCharacter function loads a font from the system,
// it seems that on WASM we must load the font manually.
Expand Down
6 changes: 0 additions & 6 deletions samples/MauiSample/General/Scrollable/View.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<vms:ViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<!--
This sample is not working yet, this is an experimental version that requies net MAUI 7 at least,
if you are on net6.0 please update:
https://devblogs.microsoft.com/dotnet/dotnet-maui-dotnet-7/#upgrading-from-net-6
-->

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
Expand Down
26 changes: 26 additions & 0 deletions src/LiveChartsCore.Behaviours/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// The MIT License(MIT)
//
// Copyright(c) 2021 Alberto Rodriguez Orozco & LiveCharts Contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#if !DEBUG
using System.Reflection;
[assembly: AssemblyKeyFile("./../../LiveCharts.snk")]
#endif
1 change: 1 addition & 0 deletions src/LiveChartsCore.Behaviours/ChartBehaviour.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#if ANDROID

using System;
using Android.Views;
using LiveChartsCore.Drawing;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if MACCATALYST || IOS

using System;
using CoreGraphics;
using LiveChartsCore.Drawing;
using UIKit;

Expand Down
23 changes: 22 additions & 1 deletion src/LiveChartsCore.Behaviours/LiveChartsCore.Behaviours.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@
<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>

<AssemblyName>LiveChartsCore.Behaviours</AssemblyName>
<RootNamespace>LiveChartsCore.Behaviours</RootNamespace>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Adds user interaction for touch screens, touch pads and mouse.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>BetoRodriguez</Authors>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<RepositoryUrl>https://github.com/beto-rodriguez/LiveCharts2</RepositoryUrl>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows10.0.19041.0'">
Expand All @@ -17,4 +34,8 @@
<ProjectReference Include="..\LiveChartsCore\LiveChartsCore.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="images\icon.png" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Binary file added src/LiveChartsCore.Behaviours/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/LiveChartsCore/Kernel/Coordinate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,13 @@ private Coordinate(bool isEmpty) : this(0, 0, 0, 0, 0, 0, Error.Empty)
/// Gets or sets the coordinate error.
/// </summary>
public readonly Error PointError { get; }

/// <summary>
/// Builds a string that represents the current coordinate.
/// </summary>
/// <returns></returns>
public override string ToString()
{
return $"({SecondaryValue}, {PrimaryValue})";
}
}
2 changes: 1 addition & 1 deletion src/LiveChartsCore/LiveChartsCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<AssemblyName>LiveChartsCore</AssemblyName>
<RootNamespace>LiveChartsCore</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for .Net, this is the core package probably you need another package also unless you are building your own backed.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
11 changes: 11 additions & 0 deletions src/LiveChartsCore/Measure/Bounds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ public class Bounds
public Bounds()
{ }

/// <summary>
/// Creates a new instance of the <see cref="Bounds"/> class.
/// </summary>
/// <param name="max">The maximum value.</param>
/// <param name="min">The minimum value.</param>
public Bounds(double min, double max)
{
Max = max;
Min = min;
}

/// <summary>
/// Creates a new instance of the <see cref="Bounds"/> class. based on the given <see cref="Bounds"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFrameworks>netcoreapp2.0;netstandard2.0;net462;net6.0</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.Avalonia</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.Avalonia</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for AvaloniaUI.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.WPF</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.WPF</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for WPF.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.WPF" Version="2.88.5" />
<PackageReference Include="SkiaSharp.Views.WPF" Version="2.88.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.WinForms</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.WinForms</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for WindowsForms.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.WindowsForms" Version="2.88.5" />
<PackageReference Include="SkiaSharp.Views.WindowsForms" Version="2.88.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.XamarinForms</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.XamarinForms</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for XamarinForms.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -22,7 +22,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.88.5" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.88.6" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.1874" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<AssemblyName>LiveChartsCore.SkiaSharpView</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for .Net, this package contains the SkiaSharp backend.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -37,8 +37,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.5" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.5" />
<PackageReference Include="SkiaSharp" Version="2.88.6" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Blazor.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down Expand Up @@ -45,7 +45,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SkiaSharp.Views.Blazor" Version="2.88.5" />
<PackageReference Include="SkiaSharp.Views.Blazor" Version="2.88.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.Eto</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.Eto</RootNamespace>
<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Eto.Forms.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>

<Version>2.0.0-rc1</Version>
<Version>2.0.0-rc1.1</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Maui.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -28,7 +28,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Maui.Controls.Compatibility" Version="2.88.5" />
<PackageReference Include="SkiaSharp.Views.Maui.Controls.Compatibility" Version="2.88.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>LiveChartsCore.SkiaSharpView.Maui</id>
<version>2.0.0-rc1</version>
<version>2.0.0-rc1.1</version>
<title>LiveChartsCore.SkiaSharpView.Maui</title>
<authors>BetoRodriguez</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand All @@ -16,24 +16,24 @@

<dependencies>
<group targetFramework="net6.0">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.5" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1" />
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.6" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1.1" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.5" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1" />
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.6" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1.1" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.5" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1" />
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.6" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1.1" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.5" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1" />
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.6" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1.1" />
</group>
<group targetFramework="net6.0-windows10.0.18362">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.5" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1" />
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.6" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-rc1.1" />
</group>
</dependencies>
</metadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public PieChart()
chartBehaviour.Pressed += OnPressed;
chartBehaviour.Moved += OnMoved;
chartBehaviour.Released += OnReleased;
chartBehaviour.Scrolled += OnScrolled;
chartBehaviour.Exited += OnExited;

chartBehaviour.On(this);
Expand Down Expand Up @@ -704,13 +703,6 @@ private void OnReleased(object? sender, Behaviours.Events.PressedEventArgs args)
_core?.InvokePointerUp(args.Location, args.IsSecondaryPress);
}

private void OnScrolled(object? sender, Behaviours.Events.ScrollEventArgs args)
{
if (_core is null) throw new Exception("core not found");
var c = (CartesianChart<SkiaSharpDrawingContext>)_core;
c.Zoom(args.Location, args.ScrollDelta > 0 ? ZoomDirection.ZoomIn : ZoomDirection.ZoomOut);
}

private void OnExited(object? sender, Behaviours.Events.EventArgs args)
{
_core?.InvokePointerLeft();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public PolarChart()
chartBehaviour.Pressed += OnPressed;
chartBehaviour.Moved += OnMoved;
chartBehaviour.Released += OnReleased;
chartBehaviour.Scrolled += OnScrolled;
chartBehaviour.Exited += OnExited;

chartBehaviour.On(this);
Expand Down Expand Up @@ -780,13 +779,6 @@ private void OnReleased(object? sender, Behaviours.Events.PressedEventArgs args)
_core?.InvokePointerUp(args.Location, args.IsSecondaryPress);
}

private void OnScrolled(object? sender, Behaviours.Events.ScrollEventArgs args)
{
if (_core is null) throw new Exception("core not found");
var c = (CartesianChart<SkiaSharpDrawingContext>)_core;
c.Zoom(args.Location, args.ScrollDelta > 0 ? ZoomDirection.ZoomIn : ZoomDirection.ZoomOut);
}

private void OnExited(object? sender, Behaviours.Events.EventArgs args)
{
_core?.InvokePointerLeft();
Expand Down
Loading

0 comments on commit f26a3b3

Please sign in to comment.