Skip to content

Commit

Permalink
Merge pull request #615 from beto-rodriguez/dev
Browse files Browse the repository at this point in the history
Beta 400
  • Loading branch information
beto-rodriguez authored Sep 5, 2022
2 parents 6f7f1b2 + 4bd9848 commit b3f9c38
Show file tree
Hide file tree
Showing 129 changed files with 3,140 additions and 325 deletions.
3 changes: 3 additions & 0 deletions samples/AvaloniaSample/AvaloniaSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
<Compile Update="General\MultiThreading\View.axaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="General\VisualElements\View.axaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="General\Sections2\View.axaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
Expand Down
15 changes: 15 additions & 0 deletions samples/AvaloniaSample/General/VisualElements/View.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<UserControl x:Class="AvaloniaSample.General.VisualElements.View"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
xmlns:vms="using:ViewModelsSamples.General.VisualElements">
<UserControl.DataContext>
<vms:ViewModel/>
</UserControl.DataContext>
<Grid>
<lvc:CartesianChart
Series="{Binding Series}"
VisualElements="{Binding VisualElements}">
</lvc:CartesianChart>
</Grid>
</UserControl>
17 changes: 17 additions & 0 deletions samples/AvaloniaSample/General/VisualElements/View.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace AvaloniaSample.General.VisualElements;

public class View : UserControl
{
public View()
{
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
3 changes: 2 additions & 1 deletion samples/BlazorSample/Pages/Design/LinearGradients.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
@using ViewModelsSamples.Design.LinearGradients

<CartesianChart
Series="ViewModel.Series">
Series="ViewModel.Series"
LegendPosition="LiveChartsCore.Measure.LegendPosition.Right">
</CartesianChart>

@code {
Expand Down
3 changes: 2 additions & 1 deletion samples/BlazorSample/Pages/Design/RadialGradients.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
@using ViewModelsSamples.Design.RadialGradients

<PieChart
Series="ViewModel.Series">
Series="ViewModel.Series"
LegendPosition="LiveChartsCore.Measure.LegendPosition.Right">
</PieChart>

@code {
Expand Down
12 changes: 12 additions & 0 deletions samples/BlazorSample/Pages/General/VisualElements.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@page "/General/VisualElements"
@using LiveChartsCore.SkiaSharpView.Blazor
@using ViewModelsSamples.General.VisualElements

<CartesianChart
Series="ViewModel.Series"
VisualElements="ViewModel.VisualElements">
</CartesianChart>

@code {
public ViewModel ViewModel { get; set; } = new();
}
6 changes: 4 additions & 2 deletions samples/ConsoleSample/ConsoleSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
{
new LineSeries<int> { Values = new int[] { 1, 5, 4, 6 } },
new ColumnSeries<int> { Values = new int[] { 4, 8, 2, 4 } }
}
},
LegendPosition = LiveChartsCore.Measure.LegendPosition.Right
};

// you can save the image to png (by default)
Expand All @@ -28,7 +29,8 @@
new PieSeries<int> { Values = new int[] { 10, } },
new PieSeries<int> { Values = new int[] { 6 } },
new PieSeries<int> { Values = new int[] { 4 } }
}
},
LegendPosition = LiveChartsCore.Measure.LegendPosition.Right
};

pieChart.SaveImage("pieChart.png");
Expand Down
21 changes: 21 additions & 0 deletions samples/EtoFormsSample/General/VisualElements/View.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Eto.Forms;
using LiveChartsCore.SkiaSharpView.Eto;
using ViewModelsSamples.General.VisualElements;

namespace EtoFormsSample.General.VisualElements;

public class View : Panel
{
public View()
{
var viewModel = new ViewModel();

var cartesianChart = new CartesianChart
{
Series = viewModel.Series,
VisualElements = viewModel.VisualElements,
};

Content = cartesianChart;
}
}
19 changes: 19 additions & 0 deletions samples/MauiSample/General/VisualElements/View.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="MauiSample.General.VisualElements.View"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.Maui;assembly=LiveChartsCore.SkiaSharpView.Maui"
xmlns:vms="clr-namespace:ViewModelsSamples.General.VisualElements;assembly=ViewModelsSamples"
>
<ContentPage.BindingContext>
<vms:ViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<Grid>
<lvc:CartesianChart
Series="{Binding Series}"
VisualElements="{Binding VisualElements}">
</lvc:CartesianChart>
</Grid>
</ContentPage.Content>
</ContentPage>
10 changes: 10 additions & 0 deletions samples/MauiSample/General/VisualElements/View.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace MauiSample.General.VisualElements;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class View : ContentPage
{
public View()
{
InitializeComponent();
}
}
6 changes: 6 additions & 0 deletions samples/MauiSample/MauiSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
</ItemGroup>

<ItemGroup>
<Compile Update="General\VisualElements\View.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="Test\Dispose\View.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
Expand Down Expand Up @@ -162,6 +165,9 @@
<MauiXaml Update="General\NullPoints\View.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="General\VisualElements\View.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="General\Sections2\View.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down
22 changes: 22 additions & 0 deletions samples/UWPSample/General/VisualElements/View.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<UserControl
x:Class="UWPSample.General.VisualElements.View"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Uno"
xmlns:vms="using:ViewModelsSamples.General.VisualElements"
mc:Ignorable="d">

<UserControl.DataContext>
<vms:ViewModel/>
</UserControl.DataContext>

<Grid>
<lvc:CartesianChart
Series="{Binding Series}"
VisualElements="{Binding VisualElements}">
</lvc:CartesianChart>
</Grid>

</UserControl>
12 changes: 12 additions & 0 deletions samples/UWPSample/General/VisualElements/View.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Windows.UI.Xaml.Controls;

namespace UWPSample.General.VisualElements
{
public sealed partial class View : UserControl
{
public View()
{
InitializeComponent();
}
}
}
7 changes: 7 additions & 0 deletions samples/UWPSample/UWPSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@
<Compile Include="General\NullPoints\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
<Compile Include="General\VisualElements\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
<Compile Include="General\Sections2\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -546,6 +549,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="General\VisualElements\View.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="General\Sections2\View.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
</UserControl.DataContext>
<lvc:CartesianChart
Series="{Binding Series}"
Sections="{Binding Sections}">
Sections="{Binding Sections}">
</lvc:CartesianChart>
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<UserControl
x:Class="UnoSample.General.VisualElements.View"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Uno"
xmlns:vms="using:ViewModelsSamples.General.VisualElements"
mc:Ignorable="d">

<UserControl.DataContext>
<vms:ViewModel/>
</UserControl.DataContext>

<Grid>
<lvc:CartesianChart
Series="{Binding Series}"
VisualElements="{Binding VisualElements}">
</lvc:CartesianChart>
</Grid>

</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Windows.UI.Xaml.Controls;

namespace UnoSample.General.VisualElements;

public sealed partial class View : UserControl
{
public View()
{
InitializeComponent();
}
}
13 changes: 12 additions & 1 deletion samples/UnoSample/UnoSample.Shared/UnoSample.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
<Compile Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\NullPoints\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\VisualElements\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\Sections2\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -674,7 +677,9 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</_Globbled_Page>
<Page Include="@(_Globbled_Page)" />
<Page Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\VisualElements\View.xaml">
<SubType>Designer</SubType>
</Page>
<_Globbed_Compile Include="$(MSBuildThisFileDirectory)**/*.xaml.cs" Exclude="@(Compile)">
<DependentUpon>%(Filename)</DependentUpon>
</_Globbed_Compile>
Expand All @@ -684,4 +689,10 @@
<_Globbed_Content Include="$(MSBuildThisFileDirectory)Assets/**/*.*" Exclude="@(Content)" />
<Content Include="@(_Globbed_Content)" />
</ItemGroup>
<ItemGroup>
<Page Update="C:\_dev\LiveCharts2\samples\UnoSample\UnoSample.Shared\LiveChartsSamples\General\Sections - Copy\View.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions samples/UnoSample/UnoSample.Shared/UnoSample.Shared.shproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<_Globbed_Compile Remove="LiveChartsSamples\General\MultiThreading2\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\MultiThreading\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\NullPoints\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\Sections - Copy\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\Sections2\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\Sections\View.xaml.cs" />
<_Globbed_Compile Remove="LiveChartsSamples\General\TemplatedLegends\View.xaml.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<UserControl
x:Class="UnoWinUISample.General.VisualElements.View"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Uno.WinUI"
xmlns:vms="using:ViewModelsSamples.General.VisualElements"
mc:Ignorable="d">

<UserControl.DataContext>
<vms:ViewModel/>
</UserControl.DataContext>

<Grid>
<lvc:CartesianChart
Series="{Binding Series}"
VisualElements="{Binding VisualElements}">
</lvc:CartesianChart>
</Grid>

</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Microsoft.UI.Xaml.Controls;

namespace UnoWinUISample.General.VisualElements;

public sealed partial class View : UserControl
{
public View()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,12 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</_Globbled_Page>
<Page Include="@(_Globbled_Page)" />
<Page Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\VisualElements\View.xaml" />
<_Globbed_Compile Include="$(MSBuildThisFileDirectory)**/*.xaml.cs" Exclude="@(Compile)">
<DependentUpon>%(Filename)</DependentUpon>
</_Globbed_Compile>
<_Globbed_Compile Include="$(MSBuildThisFileDirectory)**/*.cs" Exclude="@(Compile);@(_Globbed_Compile)" />
<Compile Include="@(_Globbed_Compile)" />
<Compile Include="$(MSBuildThisFileDirectory)LiveChartsSamples\General\VisualElements\View.xaml.cs" />
<_Globbed_PRIResource Include="$(MSBuildThisFileDirectory)**/*.resw" Exclude="@(PRIResource)" />
<PRIResource Include="@(_Globbed_PRIResource)" />
<_Globbed_Content Include="$(MSBuildThisFileDirectory)Assets/**/*.*" Exclude="@(Content)" />
Expand All @@ -690,4 +690,16 @@
<!-- Make sure XAML files force reevaluation of up-to-date checks -->
<UpToDateCheckInput Include="$(MSBuildThisFileDirectory)**/*.xaml" />
</ItemGroup>
<ItemGroup>
<Compile Update="C:\_dev\LiveCharts2\samples\UnoWinUISample\UnoWinUISample\UnoWinUISample.Shared\LiveChartsSamples\General\Sections - Copy\View.xaml.cs">
<DependentUpon>View.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="C:\_dev\LiveCharts2\samples\UnoWinUISample\UnoWinUISample\UnoWinUISample.Shared\LiveChartsSamples\General\Sections - Copy\View.xaml">
<XamlRuntime>WinUI</XamlRuntime>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion samples/ViewModelsSamples/Axes/LabelsRotation/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial class ViewModel
{
// Use the Label property to indicate the format of the labels in the axis
// The Labeler takes the value of the label as parameter and must return it as string
Labeler = (value) => "Day " + value,
Labeler = (value) => "so long label with this Day " + value,

// The MinStep property lets you define the minimum separation (in chart values scale)
// between every axis separator, in this case we don't want decimals,
Expand All @@ -44,6 +44,7 @@ public partial class ViewModel
{
new Axis
{
IsVisible = false,
LabelsRotation = 15,

// Now the Y axis we will display it as currency
Expand Down
Loading

0 comments on commit b3f9c38

Please sign in to comment.