aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/_charts/line-chart
diff options
context:
space:
mode:
authorIvan Ljubisavljevic <ivan996sk@gmail.com>2022-04-30 21:50:10 +0200
committerIvan Ljubisavljevic <ivan996sk@gmail.com>2022-04-30 21:50:10 +0200
commit7cabfa3d4220d840b47f268ffbc31901cae52167 (patch)
tree9a0c010c57f4f37ee2c2ef04ba148d2546015bd0 /frontend/src/app/_elements/_charts/line-chart
parenta3a3fad7ad76b82700b86670048349097c4cd3b7 (diff)
parent1bc241274e1cbef3a0c3edd9f8acd8df418d52ba (diff)
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_elements/_charts/line-chart')
-rw-r--r--frontend/src/app/_elements/_charts/line-chart/line-chart.component.html8
-rw-r--r--frontend/src/app/_elements/_charts/line-chart/line-chart.component.ts37
2 files changed, 30 insertions, 15 deletions
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 c8f406f4..7f18256a 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,5 +1,3 @@
-<div class="chart-wrapper">
- <canvas id="myChart">
-
- </canvas>
-</div> \ No newline at end of file
+
+ <canvas id="myChart" style="width: 100%; height: 530px;">
+ </canvas> \ No newline at end of file
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 49558025..34df38bc 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
@@ -1,4 +1,4 @@
-import { Component, AfterViewInit } from '@angular/core';
+import { Component, AfterViewInit, ViewChild } from '@angular/core';
import { Chart } from 'chart.js';
@Component({
@@ -9,12 +9,12 @@ import { Chart } from 'chart.js';
export class LineChartComponent implements AfterViewInit {
- dataAcc: number[] = [];
- dataMAE: number[] = [];
- dataMSE: number[] = [];
- dataLOSS: number[] = [];
+ dataAcc: number[] = [2,3,5,5,6,7,8,8,4,6,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
+ dataMAE: number[] = [2,3,5,5,6,7,8,8,4,6,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
+ dataMSE: number[] = [2,3,5,5,6,7,8,8,4,6,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
+ dataLOSS: number[] =[2,3,5,5,6,7,8,8,4,6,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
- dataEpoch: number[] = [];
+ dataEpoch: number[] = [2,3,5,5,6,7,8,8,4,6,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
constructor() {
/*let i = 0;
@@ -77,11 +77,28 @@ export class LineChartComponent implements AfterViewInit {
},
options: {
scales: {
- y: {
- beginAtZero: true
- }
+ x:{
+ ticks: {
+ color: 'white'
+ },
+ grid: {
+ color: "rgba(0, 99, 171, 0.5)"
+ }
+ },
+ y: {
+ beginAtZero: true,
+ ticks: {
+ color: 'white'
+ },
+ grid: {
+ color: "rgba(0, 99, 171, 0.5)"
+ }
+ }
+
}
- }
+
+
+ }
}
);
}