diff --git a/Plotly.NET.sln b/Plotly.NET.sln index d2f8b55d5..784ffbd9d 100644 --- a/Plotly.NET.sln +++ b/Plotly.NET.sln @@ -51,7 +51,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D docsrc\content\parallel-categories.fsx = docsrc\content\parallel-categories.fsx docsrc\content\parallel-coords.fsx = docsrc\content\parallel-coords.fsx docsrc\content\pie-daughnut-charts.fsx = docsrc\content\pie-daughnut-charts.fsx - docsrc\content\plotly-wpf.fsx = docsrc\content\plotly-wpf.fsx docsrc\content\polar-charts.fsx = docsrc\content\polar-charts.fsx docsrc\content\range-plots.fsx = docsrc\content\range-plots.fsx docsrc\content\sankey.fsx = docsrc\content\sankey.fsx @@ -79,8 +78,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{7C6D08 EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET", "src\Plotly.NET\Plotly.NET.fsproj", "{DFAC135B-36B8-4347-B1DD-B5E0144610C2}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET.WPF", "src\Plotly.NET.WPF\Plotly.NET.WPF.fsproj", "{C73BB0AE-B1AD-446A-9833-7A9543853EFA}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8C673526-8416-4DB2-AA73-908B5871A733}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET.Tests", "tests\Plotly.NET.Tests\Plotly.NET.Tests.fsproj", "{DA6EFE18-664F-4915-A4A9-46B679D1E598}" @@ -98,12 +95,6 @@ Global {DFAC135B-36B8-4347-B1DD-B5E0144610C2}.Dotnet|Any CPU.Build.0 = Dotnet|Any CPU {DFAC135B-36B8-4347-B1DD-B5E0144610C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {DFAC135B-36B8-4347-B1DD-B5E0144610C2}.Release|Any CPU.Build.0 = Release|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Dotnet|Any CPU.ActiveCfg = Dotnet|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Dotnet|Any CPU.Build.0 = Dotnet|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C73BB0AE-B1AD-446A-9833-7A9543853EFA}.Release|Any CPU.Build.0 = Release|Any CPU {DA6EFE18-664F-4915-A4A9-46B679D1E598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DA6EFE18-664F-4915-A4A9-46B679D1E598}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA6EFE18-664F-4915-A4A9-46B679D1E598}.Dotnet|Any CPU.ActiveCfg = Dotnet|Any CPU diff --git a/README.md b/README.md index 7a6c9e756..8e3570eec 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The library Plotly.NET implements charting suitable for use from F# scripting. O Documentation ============= -The documentation can be found [here.](http://muehlhaus.github.io/Plotly.NET/) +The documentation can be found [here.](http://plotly.github.io/Plotly.NET/) The documentation for this library is automatically generated (using the F# Formatting) from *.fsx and *.md files in the docs folder. If you find a typo, please submit a pull request! diff --git a/build.fsx b/build.fsx index 1e2bf7b70..d12d93595 100644 --- a/build.fsx +++ b/build.fsx @@ -116,14 +116,6 @@ Target.create "CopyBinaries" (fun _ -> |> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true)) ) -Target.create "CopyBinariesDotnet" (fun _ -> - !! "src/**/*.fsproj" - -- "src/Plotly.NET.WPF/Plotly.NET.WPF.fsproj" - |> Seq.map (fun f -> ((Path.getDirectory f) "bin" "Dotnet", "bin" (Path.GetFileNameWithoutExtension f))) - |> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true)) -) - - // -------------------------------------------------------------------------------------- // Clean build results @@ -149,13 +141,6 @@ Target.create "Build" (fun _ -> Configuration = buildConfiguration }) ) -Target.create "BuildDotnet" (fun _ -> - solutionFile - |> DotNet.build (fun p -> - { p with - Configuration = dotnetCoreConfiguration } - ) -) // -------------------------------------------------------------------------------------- // Run the unit tests using test runner @@ -277,8 +262,8 @@ Target.create "ReleaseDocsLocal" (fun _ -> printfn "%A" filesToReplaceIn Shell.replaceInFiles [ - """href="https://muehlhaus.github.io/FSharp.Plotly/""","""href=./""" - """src="https://muehlhaus.github.io/FSharp.Plotly/""", """src=./""" + """href="https://plotly.github.io/Plotly.NET/""","""href=./""" + """src="https://plotly.github.io/Plotly.NET/""", """src=./""" ".html\"", ".html" ".css\"", ".css" ".jpg\"", ".jpg" @@ -298,17 +283,6 @@ Target.create "Release" (fun _ -> Git.Branches.pushTag "" "upstream" release.NugetVersion ) -Target.create "GitReleaseNuget" (fun _ -> - let tempNugetDir = "temp/nuget" - Shell.cleanDir tempNugetDir |> ignore - Git.Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "nuget" tempNugetDir - let files = Directory.EnumerateFiles(__SOURCE_DIRECTORY__ @@ "bin") - Shell.copy tempNugetDir files - Git.Staging.stageAll tempNugetDir - Git.Commit.exec tempNugetDir (sprintf "Update git nuget packages for version %s" release.NugetVersion) - Git.Branches.push tempNugetDir -) - // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build ' to override @@ -347,13 +321,6 @@ Target.create "DotnetCoreBuild" ignore ==> "BuildCIPackages" ==> "CIBuild" -"Clean" -==> "CleanDocs" -==> "AssemblyInfo" -==> "BuildDotnet" -==> "CopyBinariesDotnet" -==> "DotnetCoreBuild" - "Clean" ==> "CleanDocs" ==> "AssemblyInfo" diff --git a/docsrc/content/plotly-wpf.fsx b/docsrc/content/plotly-wpf.fsx deleted file mode 100644 index a0af880dd..000000000 --- a/docsrc/content/plotly-wpf.fsx +++ /dev/null @@ -1,44 +0,0 @@ -(*** hide ***) -// This block of code is omitted in the generated HTML documentation. Use -// it to define helpers that you do not want to show in the documentation. - -(** -Plotly.NET -====================== - -The library Plotly.NET implements charting suitable for use from F# scripting. Once you load the library as followed, you can use the members of the `Chart` type to easily build charts. - -Plotly.NET is powered by popular JavaScript charting library [Plotly](https://plot.ly/). The library provides a complete mapping for the configuration options of the underlying library but empowers you to use the comfortable style known from the beautiful library [F# Charting](http://fslab.org/FSharp.Charting/). So you get a nice F# interface support with the full power of Plotly. -*) - -#r "../../bin/Plotly.NET/netstandard2.0/Plotly.NET.dll" -#r "../../bin/Plotly.NET.WPF/net47/Plotly.NET.WPF.dll" - -open Plotly.NET -open Plotly.NET.WPF - -(** -Example -------- - -The following example creates a combined point and line chart: -*) -let x = [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ] -let y = [5.; 2.5; 5.; 7.5; 5.; 2.5; 7.5; 4.5; 5.5; 5.] -let y' = [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.] -(** -Create the combined chart -*) -let pie1 = - [ - Chart.Point(x,y,Name="scattern"); - Chart.Line(x,y',Name="line") - |> Chart.withLineStyle(Width=2); - ] - |> Chart.Combine -(*** include-value:pie1 ***) -(** -By piping the combined chart into `Chart.Show` function it will be displayed in your browser. -*) -(*** do-not-eval ***) -|> Chart.ShowWPF diff --git a/docsrc/tools/generate.fsx b/docsrc/tools/generate.fsx index d14b6f85d..f4a01a50f 100644 --- a/docsrc/tools/generate.fsx +++ b/docsrc/tools/generate.fsx @@ -35,7 +35,7 @@ let rec copyRecursive dir1 dir2 = File.Copy(file, file.Replace(dir1, dir2), true) // Web site location for the generated documentation -let website = "https://muehlhaus.github.io/Plotly.NET/" +let website = "https://plotly.github.io/Plotly.NET" let info = [ "project-name", "Plotly.NET" @@ -53,13 +53,11 @@ let info = let referenceBinaries = [ __SOURCE_DIRECTORY__ + "/../../src/Plotly.NET/bin/Release/netstandard2.0/Plotly.NET.dll" - __SOURCE_DIRECTORY__ + "/../../src/Plotly.NET.WPF//bin/Release/net47/Plotly.NET.WPF.dll" ] let libDirs = [ __SOURCE_DIRECTORY__ + "/../../src/Plotly.NET/bin/Release/netstandard2.0/" - __SOURCE_DIRECTORY__ + "/../../src/Plotly.NET.WPF/bin/Release/net47/" ] // When called from 'build.fsx', use the public project URL as diff --git a/docsrc/tools/templates/template.cshtml b/docsrc/tools/templates/template.cshtml index 6b850244a..dd8dd3cf3 100644 --- a/docsrc/tools/templates/template.cshtml +++ b/docsrc/tools/templates/template.cshtml @@ -88,9 +88,6 @@
  • Multiple Charts
  • Error bars
  • Shapes
  • - -
  • Using Plotly PopUp window
  • -
  • API Reference
  • diff --git a/src/Plotly.NET.WPF/AssemblyInfo.fs b/src/Plotly.NET.WPF/AssemblyInfo.fs deleted file mode 100644 index b67e97c2d..000000000 --- a/src/Plotly.NET.WPF/AssemblyInfo.fs +++ /dev/null @@ -1,17 +0,0 @@ -// Auto-Generated by FAKE; do not edit -namespace System -open System.Reflection - -[] -[] -[] -[] -[] -do () - -module internal AssemblyVersionInformation = - let [] AssemblyTitle = "Plotly.NET.WPF" - let [] AssemblyProduct = "Plotly.NET" - let [] AssemblyDescription = "A F# interactive charting library using plotly.js" - let [] AssemblyVersion = "1.2.3" - let [] AssemblyFileVersion = "1.2.3" diff --git a/src/Plotly.NET.WPF/ChartWPF.fs b/src/Plotly.NET.WPF/ChartWPF.fs deleted file mode 100644 index 10535c169..000000000 --- a/src/Plotly.NET.WPF/ChartWPF.fs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Plotly.NET.WPF - - -[] -module ChartWPF = - - - open System - open System.IO - - open Plotly.NET - open GenericChart - - - - type Chart with - - - static member ShowWPF (ch:GenericChart) = - let guid = Guid.NewGuid().ToString() - let html = GenericChart.toEmbeddedHTML ch - ViewContainer.showHTML html - diff --git a/src/Plotly.NET.WPF/FSharp.Plotly.WPF.fsproj b/src/Plotly.NET.WPF/FSharp.Plotly.WPF.fsproj deleted file mode 100644 index 88a550947..000000000 --- a/src/Plotly.NET.WPF/FSharp.Plotly.WPF.fsproj +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/Plotly.NET.WPF/Plotly.NET.WPF.fsproj b/src/Plotly.NET.WPF/Plotly.NET.WPF.fsproj deleted file mode 100644 index f9969d492..000000000 --- a/src/Plotly.NET.WPF/Plotly.NET.WPF.fsproj +++ /dev/null @@ -1,37 +0,0 @@ - - - net45;net47 - Plotly.NET.WPF - Plotly.NET.WPF - Plotly.NET.WPF - Library - true - - true - - true - - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - Debug;Release;Dotnet - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Plotly.NET.WPF/ViewContainer.fs b/src/Plotly.NET.WPF/ViewContainer.fs deleted file mode 100644 index f5f08196e..000000000 --- a/src/Plotly.NET.WPF/ViewContainer.fs +++ /dev/null @@ -1,111 +0,0 @@ -namespace Plotly.NET.WPF - -module ViewContainer = - -//#if INTERACTIVE -//#r "PresentationCore.dll" -//#r "PresentationFramework.dll" -//#r "WindowsBase.dll" -//#r "UIAutomationTypes.dll" -//#r "System.Xaml.dll" -//#r "" -//#endif - - open System - open System.Windows - open System.Windows.Threading - open System.Threading - -//open System.Windows.Media.Imaging - -///// Creates the bitmap frame used to set the chart's window icon. -//let private bitmapFrame = -// let uriString = @"pack://application:,,,/FsPlot;component/ChartIcon.ico" -// let iconUri = Uri(uriString, UriKind.RelativeOrAbsolute) -// BitmapFrame.Create(iconUri) -// -///// Displays a window containing a browser control. -//let show html = -// let wnd = Window(Height = 500., Topmost = true, Width = 700.) -// wnd.Icon <- bitmapFrame -// wnd.WindowStartupLocation <- WindowStartupLocation.CenterScreen -// let browser = new WebBrowser() -// wnd.Content <- browser -// wnd.Show() -// wnd.Topmost <- false -// wnd, browser - - - /// Lazy initalization of the UI thread and application - let initUI = - let mk() = - let wh = new ManualResetEvent(false) - let application = ref null - let start() = - let app = new Application() - application := app - ignore(wh.Set()) - app.Run() |> ignore - let thread = Thread start - thread.IsBackground <- true - thread.SetApartmentState ApartmentState.STA - thread.Start() - ignore(wh.WaitOne()) - !application, thread - lazy mk() - - let spawn : ('a -> 'b) -> 'a -> 'b = - fun f x -> - let app, thread = initUI.Force() - let f _ = - try - let f_x = f x - fun () -> f_x - with e -> - fun () -> raise e - let t = app.Dispatcher.Invoke(DispatcherPriority.Send, System.Func<_,_>(f), null) - (t :?> unit -> 'b)() - - - /// Creates a windows with a given content - let create_window height width content = - let wnd = Window(Height = height, Topmost = true, Width = width) - wnd.Content <- content - wnd.Show() - wnd.Topmost <- false - wnd - - let createBrowserContainerWith height width () = - let suppressScriptErrors (wb:System.Windows.Controls.WebBrowser , hide:bool) = - let fi = typeof.GetField("_axIWebBrowser2", Reflection.BindingFlags.Instance ||| Reflection.BindingFlags.NonPublic); - if (fi <> null) then - let browser = fi.GetValue(wb) - if (browser <> null) then - browser.GetType().InvokeMember("Silent", Reflection.BindingFlags.SetProperty, null, browser, [|unbox hide|]) |> ignore - - - let browser = new Controls.WebBrowser() - browser.Navigating.AddHandler(new System.Windows.Navigation.NavigatingCancelEventHandler((fun (sender:obj) (e:System.Windows.Navigation.NavigatingCancelEventArgs) -> let wb = sender :?> System.Windows.Controls.WebBrowser - suppressScriptErrors(wb,true)))) - let wnd = spawn create_window height width browser - wnd,browser - - - - - - - let createContainerWithBrowser () = - createBrowserContainerWith 750. 900. () - - - let showHTMLWith height width (html:string) = - let wnd,browser = createBrowserContainerWith height width () - browser.NavigateToString (html) - - - let showHTML (html:string) = - let wnd,browser = createContainerWithBrowser() - browser.NavigateToString (html) - - diff --git a/src/Plotly.NET.WPF/WpfTest.fsx b/src/Plotly.NET.WPF/WpfTest.fsx deleted file mode 100644 index a5b868f70..000000000 --- a/src/Plotly.NET.WPF/WpfTest.fsx +++ /dev/null @@ -1,26 +0,0 @@ -//#I "./bin/Debug" -#r "./bin/Debug/Newtonsoft.Json.dll" -#r "./bin/Debug/Plotly.NET.dll" -#r "./bin/Debug/Plotly.NET.WPF.dll" - -open Plotly.NET -open Plotly.NET.WPF - - -let xValues = seq [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ] // 9.; 8.; 7.; 6.; 5.; 4.; 3.; 2.; 1.] -let yValues = seq [5.; 2.5; 5.; 7.5; 5.; 2.5; 7.5; 4.5; 5.5; 5.] -let yValues' = seq [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.] - - -// Combinded Point and Line plot -[ - - Chart.Point(xValues,yValues,Name="scattern"); - Chart.Line(xValues,yValues',Name="line") - |> Chart.withLineStyle(Width=1); -] -|> Chart.Combine -|> Chart.ShowWPF - - - diff --git a/src/Plotly.NET.WPF/paket.references b/src/Plotly.NET.WPF/paket.references deleted file mode 100644 index 0dc4ba3bb..000000000 --- a/src/Plotly.NET.WPF/paket.references +++ /dev/null @@ -1,2 +0,0 @@ -FSharp.Core -Newtonsoft.Json \ No newline at end of file diff --git a/src/Plotly.NET.WPF/paket.template b/src/Plotly.NET.WPF/paket.template deleted file mode 100644 index 6802f39b2..000000000 --- a/src/Plotly.NET.WPF/paket.template +++ /dev/null @@ -1,33 +0,0 @@ -type project -id Plotly.NET.WPF -title - Plotly.NET.WPF -owners - Timo Mühlhaus, Kevin Schneider -authors - Timo Mühlhaus, Kevin Schneider, F# open source contributors -projectUrl - https://muehlhaus.github.io/FSharp.Plotly/ -iconUrl - https://raw.githubusercontent.com/plotly/Plotly.NET/master/docsrc/files/img/logo.png -licenseUrl - https://github.com/plotly/Plotly.NET/blob/master/LICENSE -requireLicenseAcceptance - false -language - F# -copyright - Copyright 2017-2020 -tags - visualization charting plotly F# WPF -summary - A F# interactive charting library using plotly.js for WPF -description - A F# interactive charting library using plotly.js for WPF -#files -# ../../bin/Plotly.NET ==> lib -repositoryType - git -repositoryUrl - https://github.com/plotly/Plotly.NET -include-pdbs true \ No newline at end of file diff --git a/src/Plotly.NET/ChartExtensions.fs b/src/Plotly.NET/ChartExtensions.fs index 95937ecd5..5e8197330 100644 --- a/src/Plotly.NET/ChartExtensions.fs +++ b/src/Plotly.NET/ChartExtensions.fs @@ -11,7 +11,7 @@ open System.Runtime.InteropServices [] module ChartExtensions = - ///Choose process to open plots with depending on OS. Thanks to @zyzhu for hinting at a solution (https://github.com/muehlhaus/Plotly.NET/issues/31) + ///Choose process to open plots with depending on OS. Thanks to @zyzhu for hinting at a solution (https://github.com/plotly/Plotly.NET/issues/31) let private openOsSpecificFile path = if RuntimeInformation.IsOSPlatform(OSPlatform.Windows) then let psi = new System.Diagnostics.ProcessStartInfo(FileName = path, UseShellExecute = true) diff --git a/src/Plotly.NET/Plotly.NET.fsproj b/src/Plotly.NET/Plotly.NET.fsproj index 9991177f4..d48caf039 100644 --- a/src/Plotly.NET/Plotly.NET.fsproj +++ b/src/Plotly.NET/Plotly.NET.fsproj @@ -1,12 +1,6 @@  - netstandard2.0;net45;net47 - - - netstandard2.0 - - - netstandard2.0;net45;net47 + netstandard2.0 Plotly.NET diff --git a/src/Plotly.NET/paket.template b/src/Plotly.NET/paket.template index 778dd249c..1394c6fa1 100644 --- a/src/Plotly.NET/paket.template +++ b/src/Plotly.NET/paket.template @@ -7,7 +7,7 @@ owners authors Timo Mühlhaus, Kevin Schneider, F# open source contributors projectUrl - https://muehlhaus.github.io/FSharp.Plotly/ + https://plotly.github.io/Plotly.NET/ iconUrl https://raw.githubusercontent.com/plotly/Plotly.NET/master/docsrc/files/img/logo.png licenseUrl @@ -29,5 +29,5 @@ description repositoryType git repositoryUrl - https://github.com/muehlhaus/plotly/Plotly.NET + https://github.com/plotly/Plotly.NET include-pdbs true