From cccd25d73f4b67db8c0db940d57eb5902544db24 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Tue, 10 May 2022 00:45:40 +0200 Subject: Izmenjeni grafici za pregled rezultata treniranja i omogućeno vraćanje metrika backend-u. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_charts/line-chart/line-chart.component.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts') 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 655db9ec..9ead9232 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 @@ -54,9 +54,11 @@ export class LineChartComponent implements AfterViewInit { data: { labels: this.dataEpoch, datasets: [{ + label: 'Accuracy', data: this.dataAcc, - borderWidth: 1 + borderWidth: 1, + }, { label: 'Loss', @@ -76,6 +78,20 @@ export class LineChartComponent implements AfterViewInit { ] }, options: { + responsive: true, + maintainAspectRatio: true, + + plugins: { + legend: { + labels: { + // This more specific font property overrides the global property + color:'white', + font: { + size: 11 + } + } + } + }, scales: { x: { ticks: { @@ -83,12 +99,13 @@ export class LineChartComponent implements AfterViewInit { }, grid: { color: "rgba(0, 99, 171, 0.5)" - } + }, }, y: { beginAtZero: true, ticks: { color: 'white' + }, grid: { color: "rgba(0, 99, 171, 0.5)" -- cgit v1.2.3