Files
syncthing/src/app/chart/folder-chart/folder-chart.component.ts
T

42 lines
1.2 KiB
TypeScript
Raw Normal View History

import { Component, OnInit, ViewChild } from '@angular/core';
import { Folder } from '../../folder'
import { cardElevation } from '../../style'
import { FolderService } from 'src/app/folder.service';
import { SystemConfigService } from 'src/app/system-config.service';
import { DbStatusService } from 'src/app/db-status.service';
import { flatMap } from 'rxjs/operators';
import { DonutChartComponent } from '../donut-chart/donut-chart.component';
2020-03-16 12:11:27 -04:00
@Component({
selector: 'app-folder-chart',
templateUrl: './folder-chart.component.html',
styleUrls: ['./folder-chart.component.scss']
})
export class FolderChartComponent implements OnInit {
@ViewChild(DonutChartComponent) donutChart: DonutChartComponent;
chartID: string = 'foldersChart';
elevation: string = cardElevation;
constructor(
private systemConfigService: SystemConfigService,
private folderService: FolderService,
private dbStatusService: DbStatusService
) { }
2020-03-16 12:11:27 -04:00
ngOnInit(): void {
}
2020-03-16 17:58:20 -04:00
ngAfterViewInit() {
// TODO: Find total number of folders
this.folderService.getAll().subscribe(
folder => {
// TODO: Clear existing data
this.donutChart.data([0, 30, 32, 40]);
console.log("folder?", folder)
}
);
2020-03-16 12:11:27 -04:00
2020-03-16 17:58:20 -04:00
}
2020-03-16 12:11:27 -04:00
}