From 3c1217b02045ab6e5ef2d7591e7cfc4770694959 Mon Sep 17 00:00:00 2001 From: sam_hajdukiewicz Date: Mon, 30 Sep 2024 20:19:24 -0500 Subject: [PATCH] Set up the Blazor plot graph to start building the graph for the Raman spectrometer --- Basestation_Software.Api/Data/data.db-shm | Bin 0 -> 32768 bytes Basestation_Software.Api/Data/data.db-wal | 0 .../Basestation_Software.Web.csproj | 1 + .../Core/Components/RamanGraph.razor | 24 ++++++++++++++++++ Basestation_Software.Web/Core/Pages/RED.razor | 2 +- .../Core/Services/RamanGraphService.cs | 12 +++++++++ Basestation_Software.sln | 12 ++++----- 7 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 Basestation_Software.Api/Data/data.db-shm create mode 100644 Basestation_Software.Api/Data/data.db-wal create mode 100644 Basestation_Software.Web/Core/Components/RamanGraph.razor create mode 100644 Basestation_Software.Web/Core/Services/RamanGraphService.cs diff --git a/Basestation_Software.Api/Data/data.db-shm b/Basestation_Software.Api/Data/data.db-shm new file mode 100644 index 0000000000000000000000000000000000000000..fe9ac2845eca6fe6da8a63cd096d9cf9e24ece10 GIT binary patch literal 32768 zcmeIuAr62r3 + diff --git a/Basestation_Software.Web/Core/Components/RamanGraph.razor b/Basestation_Software.Web/Core/Components/RamanGraph.razor new file mode 100644 index 0000000..5d49465 --- /dev/null +++ b/Basestation_Software.Web/Core/Components/RamanGraph.razor @@ -0,0 +1,24 @@ +@using ScottPlot +@using ScottPlot.Blazor + +
+
+
+
+
RamanGraph
+
+
+
+
+ + +@code { + + BlazorPlot BlazorPlot { get; set; } = new(); + + protected override void OnAfterRender(bool firstRender) + { + BlazorPlot.Plot.Add.Signal(Generate.Sin()); + BlazorPlot.Plot.Add.Signal(Generate.Cos()); + } +} diff --git a/Basestation_Software.Web/Core/Pages/RED.razor b/Basestation_Software.Web/Core/Pages/RED.razor index 9d3a844..1b781e8 100644 --- a/Basestation_Software.Web/Core/Pages/RED.razor +++ b/Basestation_Software.Web/Core/Pages/RED.razor @@ -23,7 +23,7 @@
- @* *@ +
diff --git a/Basestation_Software.Web/Core/Services/RamanGraphService.cs b/Basestation_Software.Web/Core/Services/RamanGraphService.cs new file mode 100644 index 0000000..76e9df4 --- /dev/null +++ b/Basestation_Software.Web/Core/Services/RamanGraphService.cs @@ -0,0 +1,12 @@ +using ScottPlot.Blazor; +using ScottPlot; + +namespace Basestation_Software.Web.Core.Services +{ + public class RamanGraphService + { + BlazorPlot BlazorPlot { get; set; } = new(); + + + } +} diff --git a/Basestation_Software.sln b/Basestation_Software.sln index 4bf6a80..4f65d98 100644 --- a/Basestation_Software.sln +++ b/Basestation_Software.sln @@ -3,20 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Web", "Basestation_Software.Web\Basestation_Software.Web.csproj", "{685AF553-D781-42C7-826A-34FC743DE774}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basestation_Software.Web", "Basestation_Software.Web\Basestation_Software.Web.csproj", "{685AF553-D781-42C7-826A-34FC743DE774}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Models", "Basestation_Software.Models\Basestation_Software.Models.csproj", "{77205455-D724-4ABA-885D-56584808BD4A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basestation_Software.Models", "Basestation_Software.Models\Basestation_Software.Models.csproj", "{77205455-D724-4ABA-885D-56584808BD4A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Api", "Basestation_Software.Api\Basestation_Software.Api.csproj", "{1E94F4E9-944B-4373-96E8-2B15C550A4AF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basestation_Software.Api", "Basestation_Software.Api\Basestation_Software.Api.csproj", "{1E94F4E9-944B-4373-96E8-2B15C550A4AF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -31,4 +28,7 @@ Global {1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal