Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>

<LiveChartsVersion>2.0.0-rc6</LiveChartsVersion>
<LiveChartsVersion>2.0.0-rc6.1</LiveChartsVersion>
<LiveChartsCodeGenVersion>1.0.1</LiveChartsCodeGenVersion>
<LiveChartsAuthors>BetoRodriguez</LiveChartsAuthors>

Expand Down Expand Up @@ -30,8 +30,8 @@
<!--
Useful to toggle between using project references or nuget references
-->
<UseNuGetForSamples>true</UseNuGetForSamples>
<UseNuGetForGenerator>false</UseNuGetForGenerator>
<UseNuGetForSamples>false</UseNuGetForSamples>
<UseNuGetForGenerator>true</UseNuGetForGenerator>

</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion docs/samples/lines/zoom/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Zooming and panning is disabled by default, you can enable it by setting the `ZoomMode` property, this property is of type
[ZoomAndPanMode](https://lvcharts.com/api/{{ version }}/LiveChartsCore.Measure.ZoomAndPanMode), this type is a flag enum
it means that you can combine the options as you need, you can learn more about zooming and panning
[here](https://lvcharts.com/docs/{{ platform }}/{{ version }}/CartesianChart.Axes%20properties#zooming-and-panning).
options [here](#options).



Expand Down Expand Up @@ -219,6 +219,7 @@ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)

axis.SetLimits(min.Value, max.Value);
}
```

# Manually fire zooming or panning

Expand Down
11 changes: 6 additions & 5 deletions samples/AvaloniaSample/General/Sections/View.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@
<lvc:CartesianChart.Sections>
<!-- creates a section from 3 to 4 in the X axis -->
<lvc:XamlRectangularSection
Xi="3"
Xj="4"
Xi="{Binding Xi1}"
Xj="{Binding Xj1}"
Fill="{lvc:SolidColorPaint Color='#FFCDD2'}"/>

<!--
creates a section from 5 to 6 in the X axis
and from 2 to 8 in the Y axis
-->
<lvc:XamlRectangularSection
Xi="5" Xj="6"
Yi="2" Yj="8"
Xi="{Binding Xi2}" Xj="{Binding Xj2}"
Yi="{Binding Yi2}" Yj="{Binding Yj2}"
Fill="{lvc:SolidColorPaint Color='#BBDEFB'}"/>

<!-- creates a section from 8 to the end in the X axis -->
<lvc:XamlRectangularSection
Xi="8"
Xi="{Binding Xi3}"
Xj="{Binding Xj3}"
Label="A section here!"
LabelSize="14"
LabelPaint="{lvc:SolidColorPaint Color='#FF6F00'}"
Expand Down
11 changes: 6 additions & 5 deletions samples/MauiSample/General/Sections/View.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@
<lvc:SectionsCollection>
<!-- creates a section from 3 to 4 in the X axis -->
<lvc:XamlRectangularSection
Xi="3"
Xj="4"
Xi="{Binding Xi1}"
Xj="{Binding Xj1}"
Fill="{lvc:SolidColorPaint Color='#FFCDD2'}"/>

<!--
creates a section from 5 to 6 in the X axis
and from 2 to 8 in the Y axis
-->
<lvc:XamlRectangularSection
Xi="5" Xj="6"
Yi="2" Yj="8"
Xi="{Binding Xi2}" Xj="{Binding Xj2}"
Yi="{Binding Yi2}" Yj="{Binding Yj2}"
Fill="{lvc:SolidColorPaint Color='#BBDEFB'}"/>

<!-- creates a section from 8 to the end in the X axis -->
<lvc:XamlRectangularSection
Xi="8"
Xi="{Binding Xi3}"
Xj="{Binding Xj3}"
Label="A section here!"
LabelSize="14"
LabelPaint="{lvc:SolidColorPaint Color='#FF6F00'}"
Expand Down
11 changes: 11 additions & 0 deletions samples/ViewModelsSamples/General/Sections/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@ public partial class ViewModel
new ObservablePoint(8.9, 3.9),
new ObservablePoint(9.9, 5.2)
];

public double Xi1 { get; set; } = 3;
public double Xj1 { get; set; } = 4;

public double Xi2 { get; set; } = 5;
public double Xj2 { get; set; } = 6;
public double Yi2 { get; set; } = 2;
public double Yj2 { get; set; } = 8;

public double Xi3 { get; set; } = 8;
public double Xj3 { get; set; } = double.NaN;
Comment thread
beto-rodriguez marked this conversation as resolved.
}
26 changes: 1 addition & 25 deletions samples/ViewModelsSamples/General/Sections2/ViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using SkiaSharp;
using LiveChartsCore.Defaults;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore.SkiaSharpView.Painting;
using LiveChartsCore.SkiaSharpView.Painting.Effects;
using LiveChartsCore.Defaults;

namespace ViewModelsSamples.General.Sections2;

Expand All @@ -17,24 +13,4 @@ public class ViewModel
new(7.6, 1.8), new(8.3, 8.3), new(9.9, 5.2),
new(8.1, 4.7), new(7.4, 3.9), new(6.8, 2.3)
];

public RectangularSection[] Sections { get; set; } = [
new RectangularSection
{
Yi = 8,
Yj = 8,
Stroke = new SolidColorPaint
{
Color = SKColors.Red,
StrokeThickness = 3,
PathEffect = new DashEffect([6, 6])
}
},
new RectangularSection
{
Xi = 4,
Xj = 6,
Fill = new SolidColorPaint(SKColors.Blue.WithAlpha(20))
},
];
}
11 changes: 6 additions & 5 deletions samples/WPFSample/General/Sections/View.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@
<lvc:SectionsCollection>
<!-- creates a section from 3 to 4 in the X axis -->
<lvc:XamlRectangularSection
Xi="3"
Xj="4"
Xi="{Binding Xi1}"
Xj="{Binding Xj1}"
Fill="{lvc:SolidColorPaint Color='#FFCDD2'}"/>

<!--
creates a section from 5 to 6 in the X axis
and from 2 to 8 in the Y axis
-->
<lvc:XamlRectangularSection
Xi="5" Xj="6"
Yi="2" Yj="8"
Xi="{Binding Xi2}" Xj="{Binding Xj2}"
Yi="{Binding Yi2}" Yj="{Binding Yj2}"
Fill="{lvc:SolidColorPaint Color='#BBDEFB'}"/>

<!-- creates a section from 8 to the end in the X axis -->
<lvc:XamlRectangularSection
Xi="8"
Xi="{Binding Xi3}"
Xj="{Binding Xj3}"
Label="A section here!"
LabelSize="14"
LabelPaint="{lvc:SolidColorPaint Color='#FF6F00'}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@
<lvc:SectionsCollection>
<!-- creates a section from 3 to 4 in the X axis -->
<lvc:XamlRectangularSection
Xi="3"
Xj="4"
Xi="{Binding Xi1}"
Xj="{Binding Xj1}"
Fill="{lvc:SolidColorPaint Color='#FFCDD2'}"/>

<!--
creates a section from 5 to 6 in the X axis
and from 2 to 8 in the Y axis
-->
<lvc:XamlRectangularSection
Xi="5" Xj="6"
Yi="2" Yj="8"
Xi="{Binding Xi2}" Xj="{Binding Xj2}"
Yi="{Binding Yi2}" Yj="{Binding Yj2}"
Fill="{lvc:SolidColorPaint Color='#BBDEFB'}"/>

<!-- creates a section from 8 to the end in the X axis -->
<lvc:XamlRectangularSection
Xi="8"
Xi="{Binding Xi3}"
Xj="{Binding Xj3}"
Label="A section here!"
LabelSize="14"
LabelPaint="{lvc:SolidColorPaint Color='#FF6F00'}"
Expand Down
4 changes: 2 additions & 2 deletions samples/WinUISample/WinUISample/WinUISample.csproj
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>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250606001" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/_Shared.Native/Platforms/Android/PointerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void DisposeController(object view)
_scaleDetector?.Dispose();
_scaleDetector = null;

_customScaleListener.Dispose();
_customScaleListener?.Dispose();
_customScaleListener = null!;
}

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>$(GlobalLangVersion)</LangVersion>
<Nullable>enable</Nullable>
Expand Down Expand Up @@ -59,8 +59,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.230913002" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250606001" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="SkiaSharp.Views.WinUI" Version="$(LatestSkiaSharpVersion)" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="$(LatestSkiaSharpVersion)" />
</ItemGroup>
Expand Down
Loading