Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<AssemblyName>LiveChartsCore.Behaviours</AssemblyName>
<RootNamespace>LiveChartsCore.Behaviours</RootNamespace>
<Version>2.0.0-rc2</Version>
<Version>2.0.0-ramseyrc5</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Adds user interaction for touch screens, touch pads and mouse.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
18 changes: 18 additions & 0 deletions src/LiveChartsCore/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@ internal virtual void InvokePointerMove(LvcPoint point)
if (!_isPanning) return;
_pointerPanningPosition = point;
_panningThrottler.Call();

// fire the visual elements event.
var hitElements =
_everMeasuredElements.OfType<VisualElement<TDrawingContext>>()
.Cast<VisualElement<TDrawingContext>>()
.SelectMany(x => x.IsHitBy(this, point));

foreach (var ve in hitElements)
ve.InvokePointerMove(new VisualElementEventArgs<TDrawingContext>(this, ve, point));
}

internal virtual void InvokePointerUp(LvcPoint point, bool isSecondaryAction)
Expand All @@ -387,6 +396,15 @@ internal virtual void InvokePointerUp(LvcPoint point, bool isSecondaryAction)
_isPanning = false;
_pointerPanningPosition = point;
_panningThrottler.Call();

// fire the visual elements event.
var hitElements =
_everMeasuredElements.OfType<VisualElement<TDrawingContext>>()
.Cast<VisualElement<TDrawingContext>>()
.SelectMany(x => x.IsHitBy(this, point));

foreach (var ve in hitElements)
ve.InvokePointerUp(new VisualElementEventArgs<TDrawingContext>(this, ve, point));
}

internal void InvokePointerLeft()
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-rc2</Version>
<Version>2.0.0-ramseyrc5</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
18 changes: 16 additions & 2 deletions src/LiveChartsCore/VisualElements/VisualElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public abstract class VisualElement<TDrawingContext> : ChartElement<TDrawingCont
public MeasureUnit LocationUnit { get => _locationUnit; set => SetProperty(ref _locationUnit, value); }

/// <summary>
/// Gets or sets the axis index where the series is scaled in the X plane, the index must exist
/// Gets or sets the axis index where the series is scaled in the X plane, the index must exist
/// in the <see cref="ICartesianChartView{TDrawingContext}.YAxes"/> collection.
/// </summary>
/// <value>
Expand All @@ -91,7 +91,7 @@ public abstract class VisualElement<TDrawingContext> : ChartElement<TDrawingCont
public int ScalesXAt { get => _scalesXAt; set => SetProperty(ref _scalesXAt, value); }

/// <summary>
/// Gets or sets the axis index where the series is scaled in the Y plane, the index must exist
/// Gets or sets the axis index where the series is scaled in the Y plane, the index must exist
/// in the <see cref="ICartesianChartView{TDrawingContext}.YAxes"/> collection.
/// </summary>
/// <value>
Expand All @@ -110,6 +110,10 @@ public abstract class VisualElement<TDrawingContext> : ChartElement<TDrawingCont
/// </summary>
public event VisualElementHandler<TDrawingContext>? PointerDown;

public event VisualElementHandler<TDrawingContext>? PointerMove;

public event VisualElementHandler<TDrawingContext>? PointerUp;

/// <inheritdoc cref="ChartElement{TDrawingContext}.Invalidate(Chart{TDrawingContext})"/>
public override void Invalidate(Chart<TDrawingContext> chart)
{
Expand Down Expand Up @@ -198,6 +202,16 @@ internal void InvokePointerDown(VisualElementEventArgs<TDrawingContext> args)
PointerDown?.Invoke(this, args);
}

internal void InvokePointerMove(VisualElementEventArgs<TDrawingContext> args)
{
PointerMove?.Invoke(this, args);
}

internal void InvokePointerUp(VisualElementEventArgs<TDrawingContext> args)
{
PointerUp?.Invoke(this, args);
}

internal abstract IAnimatable?[] GetDrawnGeometries();

internal virtual void AlignToTopLeftCorner()
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-rc2</Version>
<Version>2.0.0-ramseyrc5</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 @@ -14,7 +14,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-rc2</Version>
<Version>2.0.0-ramseyrc5</Version>
<PackageIcon>icon.png</PackageIcon>
<Description>Simple, flexible, interactive and powerful data visualization for Maui.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down