adding data browser
This commit is contained in:
@@ -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>) =>
|
||||
|
||||
Reference in New Issue
Block a user