aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts')
-rw-r--r--frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts23
1 files changed, 17 insertions, 6 deletions
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<ElementRef>;
+
+ @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;
+ }
}