first step to show plot on dashboard
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</style>
|
||||
<h1 mat-dialog-title>Add Plot</h1>
|
||||
|
||||
<pdb-visualization-page mat-dialog-content></pdb-visualization-page>
|
||||
<pdb-visualization-page mat-dialog-content #plot></pdb-visualization-page>
|
||||
|
||||
<div mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, ElementRef, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { VisualizationPageComponent } from 'src/app/visualization-page/visualization-page.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-plot-dialog',
|
||||
@@ -8,10 +9,13 @@ import { MatDialogRef } from '@angular/material/dialog';
|
||||
})
|
||||
export class AddPlotDialogComponent {
|
||||
|
||||
@ViewChild("plot") plotElement! :VisualizationPageComponent;
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<string>){
|
||||
}
|
||||
|
||||
onSaveClick(): void {
|
||||
this.dialogRef.close("todo");
|
||||
const config = this.plotElement.createPlotConfig();
|
||||
this.dialogRef.close(config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user