|
|
@@ -1,9 +1,71 @@
|
|
|
import {Component} from '@angular/core';
|
|
|
|
|
|
+import {SdmDihService} from '../sdm-dih.service';
|
|
|
+
|
|
|
@Component({
|
|
|
selector: 'all-in-one-graph',
|
|
|
- templateUrl: 'all-in-one-graph.component.html',
|
|
|
+ templateUrl: './all-in-one-graph.component.html',
|
|
|
+ styleUrls: ['./all-in-one-graph.component.scss'],
|
|
|
})
|
|
|
export class AllInOneGraphComponent {
|
|
|
- constructor() {}
|
|
|
+ dataLoaded = false;
|
|
|
+ trace1 = {
|
|
|
+ y: [
|
|
|
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
|
|
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
|
|
+ ],
|
|
|
+
|
|
|
+ mode: 'markers',
|
|
|
+
|
|
|
+ marker: {
|
|
|
+ size: 40,
|
|
|
+
|
|
|
+ color: [
|
|
|
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
|
|
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
|
|
|
+ 38, 39,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ data = [this.trace1];
|
|
|
+ layout = {
|
|
|
+ height: 250,
|
|
|
+ width: '100%',
|
|
|
+ };
|
|
|
+
|
|
|
+ constructor(private sdmDihService: SdmDihService) {
|
|
|
+ this.sdmDihService.dataLoads.subscribe(() => {
|
|
|
+ this.dataLoaded = true;
|
|
|
+ });
|
|
|
+ //this.drawPlot();
|
|
|
+ }
|
|
|
+
|
|
|
+ /*drawPlot() {
|
|
|
+ const trace1 = {
|
|
|
+ y: [
|
|
|
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
|
|
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
|
|
+ ],
|
|
|
+
|
|
|
+ mode: 'markers',
|
|
|
+
|
|
|
+ marker: {
|
|
|
+ size: 40,
|
|
|
+
|
|
|
+ color: [
|
|
|
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
|
|
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
|
+ 37, 38, 39,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ const data = [trace1];
|
|
|
+
|
|
|
+ const layout = {
|
|
|
+ title: 'Scatter Plot with a Color Dimension',
|
|
|
+ };
|
|
|
+
|
|
|
+ Plotly.newPlot('plot-place', data, layout);
|
|
|
+ }*/
|
|
|
}
|