From 60782001174dc7f6f8f5670bff5aaca54667b734 Mon Sep 17 00:00:00 2001 From: Danijel Anđelković Date: Sat, 4 Jun 2022 01:17:55 +0200 Subject: Dodao poredjenje modela/prediktora nad eksperimentom. Popravio bug sa dodavanjem novog prediktora. --- .../_charts/line-chart/line-chart.component.css | 2 +- .../_charts/line-chart/line-chart.component.html | 15 +++++++------- .../_charts/line-chart/line-chart.component.ts | 23 ++++++++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) (limited to 'frontend/src/app/_elements/_charts/line-chart') diff --git a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.css b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.css index 9694119d..862a86e1 100644 --- a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.css +++ b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.css @@ -4,7 +4,7 @@ } .bottom { - height: 10%; + height: 30px; } canvas { diff --git a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.html b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.html index a81f9dc4..cc1c0121 100644 --- a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.html +++ b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.html @@ -1,28 +1,29 @@ -
+
- +
- +
- +
- +
-
-
diff --git a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts index ceff02bd..b2eec377 100644 --- a/frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts +++ b/frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts @@ -26,8 +26,12 @@ export class LineChartComponent implements AfterViewInit { @ViewChild('wrapper') wrapper!: ElementRef; - @ViewChildren('canvas') - canvas!: QueryList; + + @ViewChild('myChartacc') myChartacc!: ElementRef; + @ViewChild('myChartloss') myChartloss!: ElementRef; + @ViewChild('myChartmse') myChartmse!: ElementRef; + @ViewChild('myChartmae') myChartmae!: ElementRef; + @Input() experiment!: Experiment; @Input() predictor?: Predictor; @@ -149,7 +153,7 @@ export class LineChartComponent implements AfterViewInit { window.addEventListener('resize', () => { this.resize() }); this.resize(); - this.myChartAcc = new Chart("myChartacc", + this.myChartAcc = new Chart(this.myChartacc.nativeElement, { type: 'line', data: { @@ -222,7 +226,7 @@ export class LineChartComponent implements AfterViewInit { ); if (this.experiment.type == ProblemType.BinaryClassification || this.experiment.type == ProblemType.MultiClassification) { } - this.myChartLoss = new Chart("myChartloss", + this.myChartLoss = new Chart(this.myChartloss.nativeElement, { type: 'line', data: { @@ -294,7 +298,7 @@ export class LineChartComponent implements AfterViewInit { }, ); - this.myChartMse = new Chart("myChartmse", + this.myChartMse = new Chart(this.myChartmse.nativeElement, { type: 'line', data: { @@ -366,7 +370,7 @@ export class LineChartComponent implements AfterViewInit { }, ); - this.myChartMae = new Chart("myChartmae", + this.myChartMae = new Chart(this.myChartmae.nativeElement, { type: 'line', data: { @@ -440,5 +444,12 @@ export class LineChartComponent implements AfterViewInit { ); } + + modelName: string = ''; + + setName(name: string) { + this.modelName = name; + this.predictor = undefined; + } } -- cgit v1.2.3