adding data browser

This commit is contained in:
2024-09-08 22:11:51 -04:00
parent e88499cbaf
commit 224e6388c1
48 changed files with 1037 additions and 75 deletions

View File

@@ -8,6 +8,7 @@ import {
} from '../../components/chart/chart-type';
import { ChartConfig } from '../../components/chart/chart-config';
import { DataService } from '../../services/data.service';
import { KeyValue } from '../../models/key-value';
@Component({
selector: 'fbi-cohort-section',
@@ -63,7 +64,14 @@ export class CohortSectionComponent {
Array.isArray(this.cohort) ? this.cohort : [this.cohort]
).map((v: string) => parseInt(v));
this.dataService.Data.subscribe((data: Record<string, any>[]) => {
this.dataService.Cohorts$.subscribe(
(cohorts: KeyValue[]) =>
(this.chart.title = cohorts
.map((cohort: KeyValue) => cohort.value)
.join(', '))
);
this.dataService.Data$.subscribe((data: Record<string, any>[]) => {
this.data = data
.filter(
(d: Record<string, any>) =>