diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-03-22 15:04:36 +0000 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-03-22 15:04:36 +0000 |
commit | 012fb19a54f4d55a6e4cc73227f738f64539cf04 (patch) | |
tree | 57b3de84ad41037e8c7b1403dba4a5bad24a4752 /frontend/src/app/scatterchart/scatterchart.component.ts | |
parent | b4f0cd025a86c68a5c35a58e62c22b7cedf3d8b5 (diff) | |
parent | 31642f68564e67175301235546b74baf56ac5882 (diff) |
Merge branch 'dev' into 'Privremeno-cuvanje-podataka'
# Conflicts:
# backend/api/api/Controllers/ModelController.cs
Diffstat (limited to 'frontend/src/app/scatterchart/scatterchart.component.ts')
-rw-r--r-- | frontend/src/app/scatterchart/scatterchart.component.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/frontend/src/app/scatterchart/scatterchart.component.ts b/frontend/src/app/scatterchart/scatterchart.component.ts new file mode 100644 index 00000000..1da88fe7 --- /dev/null +++ b/frontend/src/app/scatterchart/scatterchart.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from '@angular/core'; +import {Chart} from 'node_modules/chart.js'; + +@Component({ + selector: 'app-scatterchart', + templateUrl: './scatterchart.component.html', + styleUrls: ['./scatterchart.component.css'] +}) +export class ScatterchartComponent implements OnInit { + + constructor() { } + + ngOnInit(){ + const myChart = new Chart("ScatterCharts", { + type: 'scatter', + data: { + datasets: [{ + label: 'Scatter Example:', + data: [{x: 1, y: 11}, {x:2, y:12}, {x: 1, y: 2}, {x: 2, y: 4}, {x: 3, y: 8},{x: 4, y: 16}, {x: 1, y: 3}, {x: 3, y: 4}, {x: 4, y: 6}, {x: 6, y: 9}], + backgroundColor: 'rgb(255, 99, 132)' + }] + }, + options: { + scales: { + y: { + beginAtZero: true + } + } + } + }); + } +} |