first step to show plot on dashboard
This commit is contained in:
@@ -2,14 +2,14 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Dashboard, DashboardService, TextWidget } from 'src/app/dashboard.service';
|
||||
import { Dashboard, DashboardService, PlotWidget, TextWidget } from 'src/app/dashboard.service';
|
||||
import { PlotConfig } from 'src/app/plot.service';
|
||||
import { AddPlotDialogComponent } from './add-plot-dialog/add-plot-dialog.component';
|
||||
import { AddTextDialogComponent } from './add-text-dialog/add-text-dialog.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrls: ['./dashboard.component.scss']
|
||||
templateUrl: './dashboard.component.html'
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
|
||||
@@ -34,9 +34,9 @@ export class DashboardComponent implements OnInit {
|
||||
addPlot() {
|
||||
this.dialog.open(AddPlotDialogComponent,{
|
||||
width: 'calc(100% - 1em)',
|
||||
//height: 'calc(100% - 1em)'
|
||||
}).afterClosed().subscribe((text: string) => {
|
||||
//this.dashboard!.texts.push(new TextWidget('MEDIUM', text));
|
||||
height: 'calc(100% - 1em)'
|
||||
}).afterClosed().subscribe((config: PlotConfig) => {
|
||||
this.dashboard!.plots.push(new PlotWidget('MEDIUM', config));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user