From 07ac246ec224719f532b9ebf4a55d99359cca39a Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Wed, 13 Nov 2024 11:24:01 -0700
Subject: [PATCH] add new plot component

---
 .../components/plots/plots.component.html     | 17 ++++++++++++++
 .../components/plots/plots.component.scss     |  0
 .../components/plots/plots.component.spec.ts  | 22 +++++++++++++++++++
 .../models/plots.model.ts                     |  9 ++++++++
 4 files changed, 48 insertions(+)
 create mode 100644 projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.html
 create mode 100644 projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.scss
 create mode 100644 projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.spec.ts
 create mode 100644 projects/nshmp-apps/src/app/ncm/geophysical-profiles/models/plots.model.ts

diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.html b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.html
new file mode 100644
index 000000000..e88f420e9
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.html
@@ -0,0 +1,17 @@
+<nshmp-lib-ng-plots-container>
+  <mat-accordion multi>
+    @for (plot of plots(); track $index) {
+      <mat-expansion-panel expanded>
+        <mat-expansion-panel-header>
+          <mat-panel-title>{{ plot.label }} Plot</mat-panel-title>
+        </mat-expansion-panel-header>
+
+        <mat-divider />
+
+        @if (plot) {
+          <nshmp-lib-ng-plot [plot]="plot.plotData" />
+        }
+      </mat-expansion-panel>
+    }
+  </mat-accordion>
+</nshmp-lib-ng-plots-container>
diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.scss b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.spec.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.spec.ts
new file mode 100644
index 000000000..55db3d470
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/plots/plots.component.spec.ts
@@ -0,0 +1,22 @@
+import {ComponentFixture, TestBed} from '@angular/core/testing';
+
+import {PlotsComponent} from './plots.component';
+
+describe('PlotsComponent', () => {
+  let component: PlotsComponent;
+  let fixture: ComponentFixture<PlotsComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [PlotsComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PlotsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/models/plots.model.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/models/plots.model.ts
new file mode 100644
index 000000000..38f1fdcd3
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/models/plots.model.ts
@@ -0,0 +1,9 @@
+import {NshmpPlot} from '@ghsc/nshmp-lib-ng/plot';
+
+export interface Plots {
+  density: NshmpPlot;
+  porosity: NshmpPlot;
+  temperature: NshmpPlot;
+  vp: NshmpPlot;
+  vs: NshmpPlot;
+}
-- 
GitLab