Skip to content

Commit

Permalink
Merge pull request #694 from beto-rodriguez/dev
Browse files Browse the repository at this point in the history
beta.502
  • Loading branch information
beto-rodriguez committed Oct 18, 2022
2 parents 7b0ff71 + 36abe55 commit 8a29d8b
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/LiveChartsCore/Axis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public override void Invalidate(Chart<TDrawingContext> chart)

for (var i = start; i <= max; i += s)
{
var separatorKey = labeler(i - 1d + 1d);
var separatorKey = Labelers.SevenRepresentativeDigits(i - 1d + 1d);
var labelContent = i < min || i > max ? string.Empty : separatorKey;

float x, y;
Expand Down
3 changes: 2 additions & 1 deletion src/LiveChartsCore/ConditionalDraw/ConditionalDrawBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ private void OnMeasured(ChartPoint<TModel, TVisual, TLabel> point)

var isTriggered = _whenPredicate.Invoke(point);
var canvas = ((Chart<TDrawingContext>)point.Context.Chart.CoreChart).Canvas;
var drawable = (IDrawable<TDrawingContext>)point.Visual; // see note #20221909
var drawable = (IDrawable<TDrawingContext>?)point.Visual.HighlightableGeometry; // see note #20221909
if (drawable is null) return;

if (!_isPaintInCanvas)
{
Expand Down
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-beta.501</Version>
<Version>2.0.0-beta.502</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
4 changes: 3 additions & 1 deletion src/LiveChartsCore/PieSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ public override void Invalidate(Chart<TDrawingContext> chart)
dougnutGeometry.CornerRadius = cornerRadius;
dougnutGeometry.InvertedCornerRadius = InvertedCornerRadius;
dougnutGeometry.RemoveOnCompleted = false;
if (start == initialRotation && sweep == completeAngle) dougnutGeometry.SweepAngle = completeAngle - 0.1f;

if (start + initialRotation == initialRotation && sweep == 360)
dougnutGeometry.SweepAngle = 359.99f;

point.Context.HoverArea = new SemicircleHoverArea()
.SetDimensions(cx, cy, (float)(start + initialRotation), (float)(start + initialRotation + sweep), md * 0.5f);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TargetFrameworks>netcoreapp2.0;netstandard2.0;net462;</TargetFrameworks>
<AssemblyName>LiveChartsCore.SkiaSharpView.Avalonia</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView.Avalonia</RootNamespace>
<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</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-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for WPF.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
17 changes: 5 additions & 12 deletions src/skiasharp/LiveChartsCore.SkiaSharp.WinForms/DefaultTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ namespace LiveChartsCore.SkiaSharpView.WinForms;
public partial class DefaultTooltip : Form, IChartTooltip<SkiaSharpDrawingContext>, IDisposable
{
private Panel? _tooltipContainer;
private const int BorderThickness = 2;

/// <summary>
/// Initializes a new instance of the <see cref="DefaultTooltip"/> class.
/// </summary>
public DefaultTooltip()
{
InitializeComponent();
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
BackColor = Color.Transparent;
ShowInTaskbar = false;
Paint += DefaultTooltip_Paint;
}
Expand Down Expand Up @@ -90,7 +89,7 @@ private SizeF DrawAndMesure(IEnumerable<ChartPoint> tooltipPoints, Chart chart)

using var g = CreateGraphics();

var container = new Panel { Location = new Point(10, 10) };
var container = new Panel { Location = new Point(BorderThickness, BorderThickness) };
_tooltipContainer = container;
Controls.Add(container);

Expand Down Expand Up @@ -127,7 +126,7 @@ private SizeF DrawAndMesure(IEnumerable<ChartPoint> tooltipPoints, Chart chart)
container.Height = (int)h;

ResumeLayout();
return new SizeF(w + 20, h + 20);
return new SizeF(container.Width + 2* BorderThickness, container.Height + 2* BorderThickness);
}

void IChartTooltip<SkiaSharpDrawingContext>.Hide()
Expand All @@ -144,14 +143,8 @@ void IChartTooltip<SkiaSharpDrawingContext>.Hide()
private void DefaultTooltip_Paint(object sender, PaintEventArgs e)
{
if (_tooltipContainer is null) return;

using var p1 = new Pen(Color.FromArgb(220, 220, 220));

e.Graphics.DrawRectangle(
p1,
new Rectangle(
_tooltipContainer.Location.X - 1, _tooltipContainer.Location.Y - 1,
_tooltipContainer.Width + 1, _tooltipContainer.Height + 1));
using var brush = new SolidBrush(Color.FromArgb(220, 220, 220));
e.Graphics.FillRectangle(brush, new Rectangle(0, 0, Width, Height));
}

/// <summary>
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-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for WindowsForms.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
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-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for XamarinForms.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public DoughnutGeometry()
/// <inheritdoc cref="IDoughnutGeometry{TDrawingContext}.SweepAngle" />
public float SweepAngle
{
get =>
_sweepProperty.GetMovement(this);
get => _sweepProperty.GetMovement(this);
set => _sweepProperty.SetMovement(value, this);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Nullable>enable</Nullable>
Expand All @@ -17,7 +17,7 @@

<AssemblyName>LiveChartsCore.SkiaSharpView</AssemblyName>
<RootNamespace>LiveChartsCore.SkiaSharpView</RootNamespace>
<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</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 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-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Blazor.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
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-beta.501</Version>
<Version>2.0.0-beta.502</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 @@ -14,7 +14,7 @@
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>

<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Maui.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
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-beta.501</version>
<version>2.0.0-beta.502</version>
<title>LiveChartsCore.SkiaSharpView.Maui</title>
<authors>BetoRodriguez</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand All @@ -17,23 +17,23 @@
<dependencies>
<group targetFramework="net6.0">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.3" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.3" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.3" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.3" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
<group targetFramework="net6.0-windows10.0.18362">
<dependency id="SkiaSharp.Views.Maui.Controls.Compatibility" version="2.88.3" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
</dependencies>
</metadata>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<PropertyGroup>
<TargetFrameworks>net6.0-windows10.0.18362;netstandard2.0;net6.0-ios;net6.0-macos;net6.0-maccatalyst;net6.0-android</TargetFrameworks>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>

<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Uno.WinUI.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Uno.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -9,7 +9,7 @@
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>

<Version>2.0.0-beta.501</Version>
<Version>2.0.0-beta.502</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for WinUI 3.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>LiveChartsCore.SkiaSharpView.WinUI</id>
<version>2.0.0-beta.501</version>
<version>2.0.0-beta.502</version>
<title>LiveChartsCore.SkiaSharpView.WinUI</title>
<authors>BetoRodriguez</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand All @@ -20,8 +20,8 @@
<!--not necessary in net5+-->
<!--<dependency id="Newtonsoft.Json" version="[13.0.1]" />-->
<dependency id="SkiaSharp.Views.WinUI" version="2.88.3" />
<dependency id="LiveChartsCore" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.501" />
<dependency id="LiveChartsCore" version="2.0.0-beta.502" />
<dependency id="LiveChartsCore.SkiaSharpView" version="2.0.0-beta.502" />
</group>
</dependencies>
</metadata>
Expand Down

0 comments on commit 8a29d8b

Please sign in to comment.