Skip to content

Commit

Permalink
Merge pull request Live-Charts#397 from beto-rodriguez/develop
Browse files Browse the repository at this point in the history
0.80
  • Loading branch information
beto-rodriguez authored Nov 20, 2016
2 parents 5101909 + 7776f83 commit c4b039c
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Core/Charts/ChartCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ public void ZoomOut(CorePoint pivot)

var target = l * (1 / speed);
if (target > yi.View.MaxRange) return;
var mint = pivot.X - target * rMin;
var maxt = pivot.X + target * rMax;
var mint = pivot.Y - target * rMin;
var maxt = pivot.Y + target * rMax;
yi.View.SetRange(mint, maxt);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
[assembly: AssemblyFileVersion("0.8.0")]

[assembly: InternalsVisibleTo("LiveCharts.Wpf")]
[assembly: InternalsVisibleTo("LiveChartsUwp")]//remove the . to prevent packing issue..
[assembly: InternalsVisibleTo("LiveCharts.Uwp")]
[assembly: InternalsVisibleTo("LiveCharts.Geared")]
4 changes: 2 additions & 2 deletions Core40/Charts/ChartCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ public void ZoomOut(CorePoint pivot)

var target = l * (1 / speed);
if (target > yi.View.MaxRange) return;
var mint = pivot.X - target * rMin;
var maxt = pivot.X + target * rMax;
var mint = pivot.Y - target * rMin;
var maxt = pivot.Y + target * rMax;
yi.View.SetRange(mint, maxt);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@
<TextBlock Grid.Row="0" TextWrapping="Wrap">
Use the Chart.Zoom property to enable zooming and panning, you have some options: None, X, Y and XY, click, hold and drag the chart for panning.
</TextBlock>
<Button Grid.Row="1" Height="30" Click="ToogleZoomingMode">
<TextBlock>Toggle zoming mode, current is:
<StackPanel Grid.Row="1">
<Button Height="30" Click="ToogleZoomingMode">
<TextBlock>Toggle zoming mode, current is:
<Run Text="{Binding ZoomingMode, Converter={StaticResource ZoomingModeCoverter}}"/>
</TextBlock>
</Button>
</TextBlock>
</Button>
<Button Height="30" Click="ResetZoomIOnclick">Reset Zoom</Button>
</StackPanel>
<lvc:CartesianChart Grid.Row="2" Series="{Binding SeriesCollection}" Zoom="{Binding ZoomingMode}" >
<lvc:CartesianChart.AxisX>
<lvc:Axis LabelFormatter="{Binding XFormatter}" Separator="{x:Bind CleanSeparator}"/>
<lvc:Axis Name="X" LabelFormatter="{Binding XFormatter}" Separator="{x:Bind CleanSeparator}"/>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis LabelFormatter="{Binding YFormatter}"/>
<lvc:Axis Name="Y" LabelFormatter="{Binding YFormatter}"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ public void OnPropertyChanged(string propertyName = null)
{
if (PropertyChanged != null) PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

private void ResetZoomIOnclick(object sender, RoutedEventArgs e)
{
//Use the axis MinValue/MaxValue properties to specify the values to display.
//use double.Nan to clear it.

X.MinValue = double.NaN;
X.MaxValue = double.NaN;
Y.MinValue = double.NaN;
Y.MaxValue = double.NaN;
}
}

public class ZoomingModeCoverter : IValueConverter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@
<TextBlock Grid.Row="0" TextWrapping="Wrap">
Use the Chart.Zoom property to enable zooming and panning, you have some options: None, X, Y and XY, click, hold and drag the chart for panning.
</TextBlock>
<Button Grid.Row="1" Height="30" Click="ToogleZoomingMode">
<TextBlock>Toggle zoming mode, current is:
<TextBlock Text="{Binding ZoomingMode, Converter={StaticResource ZoomingModeCoverter}}"/>
</TextBlock>
</Button>
<StackPanel Grid.Row="1">
<Button Height="30" Click="ToogleZoomingMode">
<TextBlock>Toggle zoming mode, current is:
<TextBlock Text="{Binding ZoomingMode, Converter={StaticResource ZoomingModeCoverter}}"/>
</TextBlock>
</Button>
<Button Height="30" Click="ResetZoomOnClick">Reset Zoom</Button>
</StackPanel>
<lvc:CartesianChart Grid.Row="2" Series="{Binding SeriesCollection}" Zoom="{Binding ZoomingMode}" >
<lvc:CartesianChart.AxisX>
<lvc:Axis LabelFormatter="{Binding XFormatter}" Separator="{x:Static lvc:DefaultAxes.CleanSeparator}"/>
<lvc:Axis Name="X" LabelFormatter="{Binding XFormatter}"
Separator="{x:Static lvc:DefaultAxes.CleanSeparator}"/>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis LabelFormatter="{Binding YFormatter}"/>
<lvc:Axis Name="Y" LabelFormatter="{Binding YFormatter}"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ protected virtual void OnPropertyChanged(string propertyName = null)
{
if (PropertyChanged != null) PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

private void ResetZoomOnClick(object sender, RoutedEventArgs e)
{
//Use the axis MinValue/MaxValue properties to specify the values to display.
//use double.Nan to clear it.

X.MinValue = double.NaN;
X.MaxValue = double.NaN;
Y.MinValue = double.NaN;
Y.MaxValue = double.NaN;
}
}

public class ZoomingModeCoverter : IValueConverter
Expand Down
30 changes: 15 additions & 15 deletions UwpView/UwpView.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ProjectGuid>{9F22A3E2-CE88-41C3-8117-E9D3901BAA48}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LiveChartsUwp</RootNamespace>
<AssemblyName>LiveChartsUwp</AssemblyName>
<RootNamespace>LiveCharts.Uwp</RootNamespace>
<AssemblyName>LiveCharts.Uwp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
Expand All @@ -27,7 +27,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<DocumentationFile>bin\Debug\LiveChartsUwp.xml</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -37,7 +37,7 @@
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
Expand All @@ -61,7 +61,7 @@
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
Expand All @@ -85,7 +85,7 @@
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
Expand All @@ -109,7 +109,7 @@
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -235,7 +235,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r86|AnyCPU'">
<OutputPath>bin\r86\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
Expand All @@ -248,7 +248,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r86|x86'">
<OutputPath>bin\x86\r86\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand All @@ -261,7 +261,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r86|ARM'">
<OutputPath>bin\ARM\r86\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand All @@ -274,7 +274,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r86|x64'">
<OutputPath>bin\x64\r86\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand All @@ -287,7 +287,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r64|AnyCPU'">
<OutputPath>bin\r64\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
Expand All @@ -300,7 +300,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r64|x86'">
<OutputPath>bin\x86\r64\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand All @@ -313,7 +313,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r64|ARM'">
<OutputPath>bin\ARM\r64\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand All @@ -326,7 +326,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'r64|x64'">
<OutputPath>bin\x64\r64\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DocumentationFile>bin\Debug\LiveChartsUwp.XML</DocumentationFile>
<DocumentationFile>bin\Debug\LiveCharts.Uwp.XML</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
Expand Down
10 changes: 5 additions & 5 deletions UwpView/UwpView.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
</metadata>
<files>
<file src="install.ps1" target="tools" />
<file src="bin\AnyCPU\LiveChartsUwp.dll" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveChartsUwp.pdb" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveChartsUwp.xml" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveChartsUwp.pri" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveChartsUwp\*.*" target="lib\uap10.0\LiveChartsUwp"/>
<file src="bin\AnyCPU\LiveCharts.Uwp.dll" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveCharts.Uwp.pdb" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveCharts.Uwp.xml" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveCharts.Uwp.pri" target="lib\uap10.0"/>
<file src="bin\AnyCPU\LiveCharts.Uwp\*.*" target="lib\uap10.0\LiveCharts.Uwp"/>
</files>
</package>
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Task("UWP")

BuildProject("./UwpView/UwpView.csproj", "./bin/AnyCPU", buildType, "AnyCPU");

if(buildType == "Release") NugetPack("./UwpView/UwpView.nuspec", "./UwpView/bin/AnyCPU/LiveChartsUwp.dll");
if(buildType == "Release") NugetPack("./UwpView/UwpView.nuspec", "./UwpView/bin/AnyCPU/LiveCharts.Uwp.dll");

Information("-- UWP Packed --");
});
Expand Down

0 comments on commit c4b039c

Please sign in to comment.