From a67b5f31038310b251cd9250aaae4378fdc308a2 Mon Sep 17 00:00:00 2001 From: Jeffrey Mastry Date: Thu, 1 Aug 2019 20:43:13 -0400 Subject: [PATCH 1/9] Ignore .ionide folder --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 940794e..7dbb804 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +.ionide + # User-specific files *.suo *.user From a8282f6516d5b7afa7b32533e6b8477dc185b87c Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:31:12 -0400 Subject: [PATCH 2/9] Replace solution file with dotnet core solution Replace project file with dotnet core project Use new when hiding base properties Don't compile Bing maps support when using dotnet core --- sln/InteractiveDataDisplay.WPF.sln | 76 ++++++-------------- src/Axes/AxisGrid.cs | 12 ++-- src/InteractiveDataDisplay.WPF.csproj | 79 ++++----------------- src/Legend/Legend.cs | 6 +- src/PlotBase.cs | 26 +++---- src/Plots/BingMaps/BingMapsChart.cs | 2 + src/Plots/Markers/DynamicMarkerViewModel.cs | 4 +- 7 files changed, 59 insertions(+), 146 deletions(-) diff --git a/sln/InteractiveDataDisplay.WPF.sln b/sln/InteractiveDataDisplay.WPF.sln index 734952b..f9344c9 100644 --- a/sln/InteractiveDataDisplay.WPF.sln +++ b/sln/InteractiveDataDisplay.WPF.sln @@ -1,68 +1,34 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveDataDisplay.WPF", "..\src\InteractiveDataDisplay.WPF.csproj", "{2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{6E637A98-DA68-40CF-B194-56CEB99A57A0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeatmapSample", "..\samples\HeatmapSample\HeatmapSample.csproj", "{A59C204A-01D9-41A4-BE67-64ECDB991560}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MarkersSample", "..\samples\MarkersSample\MarkersSample.csproj", "{4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LineGraphSample", "..\samples\LineGraphSample\LineGraphSample.csproj", "{284A7617-B70F-4A4A-B73A-1A8088B75926}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarChartSample", "..\samples\BarChartSample\BarChartSample.csproj", "{F36872BF-8818-4019-A207-2B381C33C370}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BingMapsSample", "..\samples\BingMapsSample\BingMapsSample.csproj", "{C724F25D-6F77-48C0-A791-28E34E6B0F0C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncGraphsSample", "..\samples\SyncGraphsSample\SyncGraphsSample.csproj", "{0C4C6C54-F253-4FD2-8B38-75E476882A4B}" +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveDataDisplay.WPF", "..\src\InteractiveDataDisplay.WPF.csproj", "{9E11FAD5-9967-4917-BFDB-436CAAC53B4C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82}.Release|Any CPU.Build.0 = Release|Any CPU - {A59C204A-01D9-41A4-BE67-64ECDB991560}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A59C204A-01D9-41A4-BE67-64ECDB991560}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A59C204A-01D9-41A4-BE67-64ECDB991560}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A59C204A-01D9-41A4-BE67-64ECDB991560}.Release|Any CPU.Build.0 = Release|Any CPU - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F}.Release|Any CPU.Build.0 = Release|Any CPU - {284A7617-B70F-4A4A-B73A-1A8088B75926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {284A7617-B70F-4A4A-B73A-1A8088B75926}.Debug|Any CPU.Build.0 = Debug|Any CPU - {284A7617-B70F-4A4A-B73A-1A8088B75926}.Release|Any CPU.ActiveCfg = Release|Any CPU - {284A7617-B70F-4A4A-B73A-1A8088B75926}.Release|Any CPU.Build.0 = Release|Any CPU - {F36872BF-8818-4019-A207-2B381C33C370}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F36872BF-8818-4019-A207-2B381C33C370}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F36872BF-8818-4019-A207-2B381C33C370}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F36872BF-8818-4019-A207-2B381C33C370}.Release|Any CPU.Build.0 = Release|Any CPU - {C724F25D-6F77-48C0-A791-28E34E6B0F0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C724F25D-6F77-48C0-A791-28E34E6B0F0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C724F25D-6F77-48C0-A791-28E34E6B0F0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C724F25D-6F77-48C0-A791-28E34E6B0F0C}.Release|Any CPU.Build.0 = Release|Any CPU - {0C4C6C54-F253-4FD2-8B38-75E476882A4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C4C6C54-F253-4FD2-8B38-75E476882A4B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C4C6C54-F253-4FD2-8B38-75E476882A4B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C4C6C54-F253-4FD2-8B38-75E476882A4B}.Release|Any CPU.Build.0 = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A59C204A-01D9-41A4-BE67-64ECDB991560} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} - {284A7617-B70F-4A4A-B73A-1A8088B75926} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} - {F36872BF-8818-4019-A207-2B381C33C370} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} - {C724F25D-6F77-48C0-A791-28E34E6B0F0C} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} - {0C4C6C54-F253-4FD2-8B38-75E476882A4B} = {6E637A98-DA68-40CF-B194-56CEB99A57A0} + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|x64.ActiveCfg = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|x64.Build.0 = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|x86.ActiveCfg = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Debug|x86.Build.0 = Debug|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|Any CPU.Build.0 = Release|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x64.ActiveCfg = Release|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x64.Build.0 = Release|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x86.ActiveCfg = Release|Any CPU + {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Axes/AxisGrid.cs b/src/Axes/AxisGrid.cs index 3b83d13..39af9f0 100644 --- a/src/Axes/AxisGrid.cs +++ b/src/Axes/AxisGrid.cs @@ -87,14 +87,14 @@ public IEnumerable HorizontalTicks /// /// Identifies dependency property /// - public static readonly DependencyProperty IsXAxisReversedProperty = + new public static readonly DependencyProperty IsXAxisReversedProperty = DependencyProperty.Register("IsXAxisReversed", typeof(bool), typeof(AxisGrid), new PropertyMetadata(false)); /// /// Gets or sets a flag indicating whether the x-axis is reversed or not. /// [Category("InteractiveDataDisplay")] - public bool IsXAxisReversed + new public bool IsXAxisReversed { get { return (bool)GetValue(IsXAxisReversedProperty); } set { SetValue(IsXAxisReversedProperty, value); } @@ -103,14 +103,14 @@ public bool IsXAxisReversed /// /// Identifies dependency property /// - public static readonly DependencyProperty IsYAxisReversedProperty = + new public static readonly DependencyProperty IsYAxisReversedProperty = DependencyProperty.Register("IsYAxisReversed", typeof(bool), typeof(AxisGrid), new PropertyMetadata(false)); /// /// Gets or sets a flag indicating whether the y-axis is reversed or not. /// [Category("InteractiveDataDisplay")] - public bool IsYAxisReversed + new public bool IsYAxisReversed { get { return (bool)GetValue(IsYAxisReversedProperty); } set { SetValue(IsYAxisReversedProperty, value); } @@ -152,7 +152,7 @@ protected override Size MeasureOverride(Size availableSize) if (Double.IsInfinity(availableSize.Height)) availableSize.Height = 1024; - + GeometryGroup group = new GeometryGroup(); double[] hTicks = HorizontalTicks.ToArray(); @@ -224,7 +224,7 @@ private double GetHorizontalCoordinateFromTick(double tick, double screenSize, R private double GetVerticalCoordinateFromTick(double tick, double screenSize, Range range) { - return screenSize - ValueToScreen(YDataTransform.DataToPlot(tick), screenSize, range, IsYAxisReversed); + return screenSize - ValueToScreen(YDataTransform.DataToPlot(tick), screenSize, range, IsYAxisReversed); } diff --git a/src/InteractiveDataDisplay.WPF.csproj b/src/InteractiveDataDisplay.WPF.csproj index f5bd771..8fa74bb 100644 --- a/src/InteractiveDataDisplay.WPF.csproj +++ b/src/InteractiveDataDisplay.WPF.csproj @@ -1,74 +1,19 @@ - - - + + - Debug - AnyCPU - {2D34544C-2DF2-4B20-A43A-6C8D2DF3DD82} - Library - Properties - InteractiveDataDisplay.WPF - InteractiveDataDisplay.WPF - net452;net46 - 512 - - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NETFRAMEWORK;NETFRAMEWORK; - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE;RELEASE;NETFRAMEWORK;;RELEASE;NETFRAMEWORK;RELEASE;NETFRAMEWORK; - prompt - 4 + netcoreapp3.0 + true true + false - - $(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets - 1.1.0 - Microsoft; MSU ITIS Lab - Sergey Berezin, Vassily Lyutsarev, Nikita Skoblov, Natalia Stepanova - Interactive Data Display for WPF is a set of controls for adding interactive visualization of dynamic data to your application. - Copyright 2017 Microsoft Corporation - idd wpf visualization plot plots plotting chart charting data interactive datavisualization - https://github.com/Microsoft/InteractiveDataDisplay.WPF - https://github.com/Microsoft/InteractiveDataDisplay.WPF/blob/master/LICENSE + + + NET_CORE + - - - - - - - - - - - - - - - - - - Designer - MSBuild:Compile - - - - - - - + + + \ No newline at end of file diff --git a/src/Legend/Legend.cs b/src/Legend/Legend.cs index 5a6c849..a7d56c4 100644 --- a/src/Legend/Legend.cs +++ b/src/Legend/Legend.cs @@ -11,7 +11,7 @@ namespace InteractiveDataDisplay.WPF /// /// Control for placing legend contents. /// - [Description("Control for legend contents")] + [Description("Control for legend contents")] public class Legend : ContentControl { /// @@ -109,8 +109,8 @@ public static void SetIsVisible(DependencyObject obj, bool isVisible) /// /// Identifies attached property to get or set visibility of a legend. /// - public static readonly DependencyProperty IsVisibleProperty = - DependencyProperty.RegisterAttached("IsVisible", typeof(bool), typeof(Legend), new PropertyMetadata(true)); + new public static readonly DependencyProperty IsVisibleProperty = + DependencyProperty.RegisterAttached("IsVisible", typeof(bool), typeof(Legend), new PropertyMetadata(true)); } } diff --git a/src/PlotBase.cs b/src/PlotBase.cs index e24f41b..acecf6c 100644 --- a/src/PlotBase.cs +++ b/src/PlotBase.cs @@ -273,7 +273,7 @@ private void AddDependant(PlotBase dependant) { dependantsField.Add(dependant); EnumAll(plot => plot.NotifyCompositionChange()); - } + } } private void RemoveDependant(PlotBase dependant) @@ -335,7 +335,7 @@ private void EnumAll(Action action) { if (masterField != this) { - if(masterField != null) + if (masterField != null) masterField.EnumAll(action); } else @@ -467,7 +467,7 @@ public IObservable CompositionChange if (!plotBase.IsMaster) { plotBase.masterField.InvalidateMeasure(); - } + } else plotBase.InvalidateMeasure(); } @@ -562,14 +562,14 @@ public IObservable CompositionChange })); /// Enables or disables clipping of graphic elements that are outside plotting area - public bool ClipToBounds + new public bool ClipToBounds { get { return (bool)GetValue(ClipToBoundsProperty); } set { SetValue(ClipToBoundsProperty, value); } } /// Identifies dependency property - public static readonly DependencyProperty ClipToBoundsProperty = + new public static readonly DependencyProperty ClipToBoundsProperty = DependencyProperty.Register("ClipToBounds", typeof(bool), typeof(PlotBase), new PropertyMetadata(true, (s, a) => ((PlotBase)s).OnClipToBoundsChanged(a))); @@ -579,7 +579,7 @@ public bool ClipToBounds /// PropertyChanged parameters protected virtual void OnClipToBoundsChanged(DependencyPropertyChangedEventArgs args) { - InvalidateMeasure(); + InvalidateMeasure(); } #endregion @@ -594,14 +594,14 @@ protected virtual void OnPlotOriginXChanged(DependencyPropertyChangedEventArgs e if (!IsInternalChange) { IsInternalChange = true; - EnumAll(p => - { + EnumAll(p => + { p.PlotOriginX = (double)e.NewValue; p.IsAutoFitEnabled = false; p.InvalidateMeasure(); }); IsInternalChange = false; - } + } } /// @@ -637,7 +637,7 @@ protected virtual void OnPlotWidthChanged(DependencyPropertyChangedEventArgs e) p.InvalidateMeasure(); }); IsInternalChange = false; - } + } } /// @@ -655,7 +655,7 @@ protected virtual void OnPlotHeightChanged(DependencyPropertyChangedEventArgs e) p.InvalidateMeasure(); }); IsInternalChange = false; - } + } } /// @@ -827,7 +827,7 @@ protected void SetPlotRect(DataRect plotRect, bool fromAutoFit) p.InvalidateMeasure(); } }); - + IsInternalChange = false; } @@ -921,7 +921,7 @@ protected Size PerformAsMaster(Size availableSize) if (double.IsNaN(availableSize.Width) || double.IsNaN(availableSize.Height) || double.IsInfinity(availableSize.Width) - || double.IsInfinity(availableSize.Height)) + || double.IsInfinity(availableSize.Height)) availableSize = new Size(100, 100); if (IsMaster) { diff --git a/src/Plots/BingMaps/BingMapsChart.cs b/src/Plots/BingMaps/BingMapsChart.cs index 7d1696d..9cd7376 100644 --- a/src/Plots/BingMaps/BingMapsChart.cs +++ b/src/Plots/BingMaps/BingMapsChart.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT License. +#if NETFRAMEWORK using System; using System.Windows; @@ -107,3 +108,4 @@ protected override Thickness AggregatePadding() } } +#endif \ No newline at end of file diff --git a/src/Plots/Markers/DynamicMarkerViewModel.cs b/src/Plots/Markers/DynamicMarkerViewModel.cs index 76389a8..644e667 100644 --- a/src/Plots/Markers/DynamicMarkerViewModel.cs +++ b/src/Plots/Markers/DynamicMarkerViewModel.cs @@ -61,7 +61,7 @@ public static Type GenerateMarkerViewModelType(DataCollection collection) if (mb == null) { AssemblyName aName = new AssemblyName("InteractiveDataDisplayAssembly2"); - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run); + AssemblyBuilder ab = AssemblyBuilder.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run); mb = ab.DefineDynamicModule(aName.Name); } TypeBuilder tb = mb.DefineType("DynamicMarkerViewModel_" + (typeModelCount++).ToString(CultureInfo.InvariantCulture), @@ -115,7 +115,7 @@ public static Type GenerateDataCollectionType(DataCollection collection) if (mb == null) { AssemblyName aName = new AssemblyName("InteractiveDataDisplayAssembly1"); - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run); + AssemblyBuilder ab = AssemblyBuilder.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run); mb = ab.DefineDynamicModule(aName.Name); } From b874f1a4505a727c0738347ecb2206d1e2844e08 Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:42:32 -0400 Subject: [PATCH 3/9] Port BarChartSample to dotnet core --- samples/BarChartSample/App.config | 6 - samples/BarChartSample/BarChartSample.csproj | 110 ++---------------- .../BarChartSample/BarChartSample.csproj.old | 103 ++++++++++++++++ sln/InteractiveDataDisplay.WPF.sln | 14 +++ 4 files changed, 128 insertions(+), 105 deletions(-) delete mode 100644 samples/BarChartSample/App.config create mode 100644 samples/BarChartSample/BarChartSample.csproj.old diff --git a/samples/BarChartSample/App.config b/samples/BarChartSample/App.config deleted file mode 100644 index 88fa402..0000000 --- a/samples/BarChartSample/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/BarChartSample/BarChartSample.csproj b/samples/BarChartSample/BarChartSample.csproj index 5348a1f..1ccce3b 100644 --- a/samples/BarChartSample/BarChartSample.csproj +++ b/samples/BarChartSample/BarChartSample.csproj @@ -1,103 +1,15 @@ - - - + + + + + + - Debug - AnyCPU - {F36872BF-8818-4019-A207-2B381C33C370} WinExe - BarChartSample - BarChartSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netcoreapp3.0 + true + false + - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - + \ No newline at end of file diff --git a/samples/BarChartSample/BarChartSample.csproj.old b/samples/BarChartSample/BarChartSample.csproj.old new file mode 100644 index 0000000..5348a1f --- /dev/null +++ b/samples/BarChartSample/BarChartSample.csproj.old @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {F36872BF-8818-4019-A207-2B381C33C370} + WinExe + BarChartSample + BarChartSample + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} + InteractiveDataDisplay.WPF + + + + \ No newline at end of file diff --git a/sln/InteractiveDataDisplay.WPF.sln b/sln/InteractiveDataDisplay.WPF.sln index f9344c9..a950dcf 100644 --- a/sln/InteractiveDataDisplay.WPF.sln +++ b/sln/InteractiveDataDisplay.WPF.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveDataDisplay.WPF", "..\src\InteractiveDataDisplay.WPF.csproj", "{9E11FAD5-9967-4917-BFDB-436CAAC53B4C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarChartSample", "..\samples\BarChartSample\BarChartSample.csproj", "{E489642B-F6D5-449E-8BEF-67E1D376D323}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,5 +32,17 @@ Global {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x64.Build.0 = Release|Any CPU {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x86.ActiveCfg = Release|Any CPU {9E11FAD5-9967-4917-BFDB-436CAAC53B4C}.Release|x86.Build.0 = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|x64.ActiveCfg = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|x64.Build.0 = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|x86.ActiveCfg = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Debug|x86.Build.0 = Debug|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|Any CPU.Build.0 = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x64.ActiveCfg = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x64.Build.0 = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x86.ActiveCfg = Release|Any CPU + {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal From 8da3e36f20c2c2fa6d574a6090e6d9e0e9561c78 Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:45:52 -0400 Subject: [PATCH 4/9] Port HeatmapSample to dotnet core --- .../BarChartSample/BarChartSample.csproj.old | 103 -------------- samples/HeatmapSample/App.config | 6 - samples/HeatmapSample/HeatmapSample.csproj | 127 ++---------------- 3 files changed, 11 insertions(+), 225 deletions(-) delete mode 100644 samples/BarChartSample/BarChartSample.csproj.old delete mode 100644 samples/HeatmapSample/App.config diff --git a/samples/BarChartSample/BarChartSample.csproj.old b/samples/BarChartSample/BarChartSample.csproj.old deleted file mode 100644 index 5348a1f..0000000 --- a/samples/BarChartSample/BarChartSample.csproj.old +++ /dev/null @@ -1,103 +0,0 @@ - - - - - Debug - AnyCPU - {F36872BF-8818-4019-A207-2B381C33C370} - WinExe - BarChartSample - BarChartSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - - \ No newline at end of file diff --git a/samples/HeatmapSample/App.config b/samples/HeatmapSample/App.config deleted file mode 100644 index 88fa402..0000000 --- a/samples/HeatmapSample/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/HeatmapSample/HeatmapSample.csproj b/samples/HeatmapSample/HeatmapSample.csproj index efd14c7..1ccce3b 100644 --- a/samples/HeatmapSample/HeatmapSample.csproj +++ b/samples/HeatmapSample/HeatmapSample.csproj @@ -1,120 +1,15 @@ - - - + + + + + + - Debug - AnyCPU - {A59C204A-01D9-41A4-BE67-64ECDB991560} WinExe - HeatmapSample - HeatmapSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netcoreapp3.0 + true + false + - - - - - ..\packages\System.Reactive.Core.3.1.1\lib\net45\System.Reactive.Core.dll - - - ..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll - - - ..\packages\System.Reactive.Linq.3.1.1\lib\net45\System.Reactive.Linq.dll - - - ..\packages\System.Reactive.PlatformServices.3.1.1\lib\net45\System.Reactive.PlatformServices.dll - - - ..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - + \ No newline at end of file From 931c32c8692c94e9af79a1f10493376ca117cb3f Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:47:57 -0400 Subject: [PATCH 5/9] Port LineGraphSample to dotnet core --- samples/LineGraphSample/App.config | 6 - .../LineGraphSample/LineGraphSample.csproj | 110 ++---------------- 2 files changed, 11 insertions(+), 105 deletions(-) delete mode 100644 samples/LineGraphSample/App.config diff --git a/samples/LineGraphSample/App.config b/samples/LineGraphSample/App.config deleted file mode 100644 index 88fa402..0000000 --- a/samples/LineGraphSample/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/LineGraphSample/LineGraphSample.csproj b/samples/LineGraphSample/LineGraphSample.csproj index f4d1ea6..1ccce3b 100644 --- a/samples/LineGraphSample/LineGraphSample.csproj +++ b/samples/LineGraphSample/LineGraphSample.csproj @@ -1,103 +1,15 @@ - - - + + + + + + - Debug - AnyCPU - {284A7617-B70F-4A4A-B73A-1A8088B75926} WinExe - LineGraphSample - LineGraphSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netcoreapp3.0 + true + false + - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - + \ No newline at end of file From 1ab1f84f89a175a68035ef32f5770fe62e63ffd8 Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:49:47 -0400 Subject: [PATCH 6/9] Port MarkersSample to dotnet core --- samples/MarkersSample/App.config | 6 -- samples/MarkersSample/MarkersSample.csproj | 110 +++------------------ 2 files changed, 11 insertions(+), 105 deletions(-) delete mode 100644 samples/MarkersSample/App.config diff --git a/samples/MarkersSample/App.config b/samples/MarkersSample/App.config deleted file mode 100644 index 88fa402..0000000 --- a/samples/MarkersSample/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/MarkersSample/MarkersSample.csproj b/samples/MarkersSample/MarkersSample.csproj index 9c5f8bc..1ccce3b 100644 --- a/samples/MarkersSample/MarkersSample.csproj +++ b/samples/MarkersSample/MarkersSample.csproj @@ -1,103 +1,15 @@ - - - + + + + + + - Debug - AnyCPU - {4BEA4B4C-5B83-4FD7-B9BF-3AE4F1CC571F} WinExe - MarkersSample - MarkersSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netcoreapp3.0 + true + false + - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - + \ No newline at end of file From 8d20b64b3a9cf9b538432b1c4855557ea00603c8 Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:50:54 -0400 Subject: [PATCH 7/9] Port SyncGraph sample to dotnet core --- samples/SyncGraphsSample/App.config | 6 - .../SyncGraphsSample/SyncGraphsSample.csproj | 119 ++---------------- 2 files changed, 11 insertions(+), 114 deletions(-) delete mode 100644 samples/SyncGraphsSample/App.config diff --git a/samples/SyncGraphsSample/App.config b/samples/SyncGraphsSample/App.config deleted file mode 100644 index 88fa402..0000000 --- a/samples/SyncGraphsSample/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/SyncGraphsSample/SyncGraphsSample.csproj b/samples/SyncGraphsSample/SyncGraphsSample.csproj index ba53a34..1ccce3b 100644 --- a/samples/SyncGraphsSample/SyncGraphsSample.csproj +++ b/samples/SyncGraphsSample/SyncGraphsSample.csproj @@ -1,112 +1,15 @@ - - - + + + + + + - Debug - AnyCPU - {0C4C6C54-F253-4FD2-8B38-75E476882A4B} WinExe - Properties - SyncGraphsSample - SyncGraphsSample - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netcoreapp3.0 + true + false + - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - {2d34544c-2df2-4b20-a43a-6c8d2df3dd82} - InteractiveDataDisplay.WPF - - - - + \ No newline at end of file From 41641753d3ccaaf06ffa1e9e864f03fe8c48693e Mon Sep 17 00:00:00 2001 From: Jeff Mastry Date: Thu, 1 Aug 2019 21:54:00 -0400 Subject: [PATCH 8/9] Add dotnet core samples to solution --- sln/InteractiveDataDisplay.WPF.sln | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sln/InteractiveDataDisplay.WPF.sln b/sln/InteractiveDataDisplay.WPF.sln index a950dcf..e17fa0f 100644 --- a/sln/InteractiveDataDisplay.WPF.sln +++ b/sln/InteractiveDataDisplay.WPF.sln @@ -7,6 +7,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveDataDisplay.WPF" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarChartSample", "..\samples\BarChartSample\BarChartSample.csproj", "{E489642B-F6D5-449E-8BEF-67E1D376D323}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeatmapSample", "..\samples\HeatmapSample\HeatmapSample.csproj", "{EC80E000-26CC-44C6-81EC-4588E17DF5A1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LineGraphSample", "..\samples\LineGraphSample\LineGraphSample.csproj", "{C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MarkersSample", "..\samples\MarkersSample\MarkersSample.csproj", "{FB0604D7-47DF-4922-BD78-842A1C1AE861}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncGraphsSample", "..\samples\SyncGraphsSample\SyncGraphsSample.csproj", "{6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -44,5 +52,53 @@ Global {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x64.Build.0 = Release|Any CPU {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x86.ActiveCfg = Release|Any CPU {E489642B-F6D5-449E-8BEF-67E1D376D323}.Release|x86.Build.0 = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|x64.ActiveCfg = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|x64.Build.0 = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|x86.ActiveCfg = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Debug|x86.Build.0 = Debug|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|Any CPU.Build.0 = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|x64.ActiveCfg = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|x64.Build.0 = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|x86.ActiveCfg = Release|Any CPU + {EC80E000-26CC-44C6-81EC-4588E17DF5A1}.Release|x86.Build.0 = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|x64.ActiveCfg = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|x64.Build.0 = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|x86.ActiveCfg = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Debug|x86.Build.0 = Debug|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|Any CPU.Build.0 = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|x64.ActiveCfg = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|x64.Build.0 = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|x86.ActiveCfg = Release|Any CPU + {C35207DA-9E1C-4D2D-8E4F-7AA193B3B7E8}.Release|x86.Build.0 = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|x64.ActiveCfg = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|x64.Build.0 = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|x86.ActiveCfg = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Debug|x86.Build.0 = Debug|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|Any CPU.Build.0 = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|x64.ActiveCfg = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|x64.Build.0 = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|x86.ActiveCfg = Release|Any CPU + {FB0604D7-47DF-4922-BD78-842A1C1AE861}.Release|x86.Build.0 = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|x64.ActiveCfg = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|x64.Build.0 = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|x86.ActiveCfg = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Debug|x86.Build.0 = Debug|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|Any CPU.Build.0 = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|x64.ActiveCfg = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|x64.Build.0 = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|x86.ActiveCfg = Release|Any CPU + {6E0CBDE1-8A39-4F6E-9CA7-5B0BE04761B1}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal From 883e609f5d6a2656637541df4140fd57a7ee2eb8 Mon Sep 17 00:00:00 2001 From: pavllick Date: Thu, 29 Aug 2019 13:54:51 -0400 Subject: [PATCH 9/9] Add Left and Right Bounds for graph home psition --- samples/LineGraphSample/MainWindow.xaml.cs | 3 +++ src/Chart.cs | 30 ++++++++++++++++++++++ src/Figure.cs | 8 ++++-- src/PlotBase.cs | 30 ++++++++++++++++++++++ src/Themes/Generic.xaml | 2 ++ 5 files changed, 71 insertions(+), 2 deletions(-) diff --git a/samples/LineGraphSample/MainWindow.xaml.cs b/samples/LineGraphSample/MainWindow.xaml.cs index 9e05c7b..da29593 100644 --- a/samples/LineGraphSample/MainWindow.xaml.cs +++ b/samples/LineGraphSample/MainWindow.xaml.cs @@ -23,6 +23,9 @@ public MainWindow() for (int i = 0; i < x.Length; i++) x[i] = 3.1415 * i / (x.Length - 1); + plotter.LeftBound = x[x.Length / 10]; + plotter.RightBound = x[x.Length - x.Length / 10]; + for (int i = 0; i < 25; i++) { var lg = new LineGraph(); diff --git a/src/Chart.cs b/src/Chart.cs index 014121c..ca8486a 100644 --- a/src/Chart.cs +++ b/src/Chart.cs @@ -67,6 +67,36 @@ protected override void OnLostFocus(RoutedEventArgs e) base.OnLostFocus(e); } + /// + /// Gets or sets Left plot bound. + /// + [Category("InteractiveDataDisplay")] + public double? LeftBound { + get { return (double?)GetValue(LeftBoundProperty); } + set { SetValue(LeftBoundProperty, value); } + } + + /// + /// Identifies dependency property + /// + public static readonly DependencyProperty LeftBoundProperty = + DependencyProperty.Register("LeftBound", typeof(double?), typeof(Chart), new PropertyMetadata(null)); + + /// + /// Identifies dependency property + /// + public static readonly DependencyProperty RightBoundProperty = + DependencyProperty.Register("RightBound", typeof(double?), typeof(Chart), new PropertyMetadata(null)); + + /// + /// Gets or sets Right plot bound. + /// + [Category("InteractiveDataDisplay")] + public double? RightBound { + get { return (double?)GetValue(RightBoundProperty); } + set { SetValue(RightBoundProperty, value); } + } + /// /// Gets or sets legend content /// diff --git a/src/Figure.cs b/src/Figure.cs index 2923e2d..de654d6 100644 --- a/src/Figure.cs +++ b/src/Figure.cs @@ -127,8 +127,12 @@ protected override Size MeasureOverride(Size availableSize) if (IsAutoFitEnabled) { desiredRect = AggregateBounds(); - if (desiredRect.IsEmpty) - desiredRect = new DataRect(0, 0, 1, 1); + if(desiredRect.IsEmpty) + desiredRect = new DataRect(0, 0, 1, 1); + else { + if(LeftBound != null && RightBound != null) + desiredRect.X = new Range(LeftBound.Value, RightBound.Value); + } SetPlotRect(desiredRect, true); } else // resize diff --git a/src/PlotBase.cs b/src/PlotBase.cs index acecf6c..2bf6799 100644 --- a/src/PlotBase.cs +++ b/src/PlotBase.cs @@ -31,6 +31,24 @@ public abstract class PlotBase : Panel #region Properties + /// + /// Desired Left plot bound. + /// + [Category("InteractiveDataDisplay")] + public double? LeftBound { + get { return (double?)GetValue(LeftBoundProperty); } + set { SetValue(LeftBoundProperty, value); } + } + + /// + /// Desired Right plot bound. + /// + [Category("InteractiveDataDisplay")] + public double? RightBound { + get { return (double?)GetValue(RightBoundProperty); } + set { SetValue(RightBoundProperty, value); } + } + /// Gets or sets padding - distance in screen units from each side of border to edges of plot bounding rectangle. /// Effective padding for composition of plots is computed as maximum of all paddings. [Category("InteractiveDataDisplay")] @@ -425,6 +443,18 @@ public IObservable CompositionChange #region Dependency Properties + /// + /// Identifies dependency property + /// + public static readonly DependencyProperty LeftBoundProperty = + DependencyProperty.Register("LeftBound", typeof(double?), typeof(PlotBase), new PropertyMetadata(null)); + + /// + /// Identifies dependency property + /// + public static readonly DependencyProperty RightBoundProperty = + DependencyProperty.Register("RightBound", typeof(double?), typeof(PlotBase), new PropertyMetadata(null)); + /// /// Identifies dependency property /// diff --git a/src/Themes/Generic.xaml b/src/Themes/Generic.xaml index 7a1788d..a753c9b 100644 --- a/src/Themes/Generic.xaml +++ b/src/Themes/Generic.xaml @@ -35,6 +35,8 @@ PlotWidth="{Binding PlotWidth, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" PlotOriginX="{Binding PlotOriginX, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" PlotOriginY="{Binding PlotOriginY, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" + LeftBound="{Binding LeftBound, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" + RightBound="{Binding RightBound, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsXAxisReversed = "{Binding IsXAxisReversed, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsYAxisReversed = "{Binding IsXAxisReversed, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsAutoFitEnabled="{Binding IsAutoFitEnabled, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"