From 2f4d64dbd6a1dd7c4cb7c37776ef34992fa543f9 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Tue, 22 Oct 2024 13:23:09 -0400 Subject: [PATCH 1/8] Update institution metric factory --- mirage/factories/institution-summary-metric.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirage/factories/institution-summary-metric.ts b/mirage/factories/institution-summary-metric.ts index e99994d552..123c422d7d 100644 --- a/mirage/factories/institution-summary-metric.ts +++ b/mirage/factories/institution-summary-metric.ts @@ -19,7 +19,7 @@ export default Factory.extend({ embargoedRegistrationCount() { return faker.random.number({ min: 0, max: 25}); }, - preprintCount() { + publishedPreprintCount() { return faker.random.number({ min: 15, max: 175}); }, storageByteCount() { From e8bcfddea71791b87db17d656125da97616d774a Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Tue, 22 Oct 2024 16:09:44 -0400 Subject: [PATCH 2/8] Get graph data from SHARE --- .../chart-kpi-wrapper/chart-kpi/component.ts | 7 +- .../chart-kpi-wrapper/chart-kpi/styles.scss | 2 +- .../chart-kpi-wrapper/chart-kpi/template.hbs | 128 +++++++------- .../chart-kpi-wrapper/component.ts | 156 ++++++++---------- translations/en-us.yml | 1 + types/ember-cli-chart.d.ts | 8 +- 6 files changed, 150 insertions(+), 152 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts index 711a744af1..555f1ea3fd 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts @@ -31,7 +31,7 @@ export default class ChartKpi extends Component { * @returns a ChartOptions model which is custom to COS */ get chartOptions(): ChartOptions { - return { + const options = { aspectRatio: 1, legend: { display: false, @@ -42,9 +42,14 @@ export default class ChartKpi extends Component { }], yAxes: [{ display: false, + ticks: { min: 0 }, }], }, }; + if (this.args.data.chartType === 'bar') { + options.scales.yAxes[0].display = true; + } + return options; } /** diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/styles.scss b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/styles.scss index 75fe4f855d..6dad4139b1 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/styles.scss +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/styles.scss @@ -6,7 +6,7 @@ display: flex; flex-direction: column; justify-content: center; - align-items: flex-start; + text-align: center; width: 290px; min-height: 290px; height: fit-content; diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/template.hbs b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/template.hbs index c62c58f81f..d55b0fd48e 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/template.hbs +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/template.hbs @@ -2,68 +2,74 @@ local-class='chart-container {{if (is-mobile) 'mobile'}}' ...attributes > -
-
- -
-
-
- {{#let (unique-id 'expanded-data') as |expandedDataId|}} -
-
{{@data.title}}
-
- -
-
-
+ {{else if @data.taskInstance.isError}} + {{t 'institutions.dashboard.kpi-chart.error'}} + {{else}} +
+
-
    - {{#each this.expandedData as |data index |}} -
  • +
+
+
+ {{#let (unique-id 'expanded-data') as |expandedDataId|}} +
+
{{@data.title}}
+
+ +
+
+
+
    + {{#each this.expandedData as |data index |}} +
  • - {{data.total}} -
- - {{/each}} - -
- {{/let}} -
+
+
+
+ {{data.name}} +
+
+ {{data.total}} +
+ + {{/each}} + +
+ {{/let}} + + {{/if}} \ No newline at end of file diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index 34cd03de93..de73f43d4c 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -1,12 +1,16 @@ +import Store from '@ember-data/store'; +import { inject as service } from '@ember/service'; import { waitFor } from '@ember/test-waiters'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; -import { task } from 'ember-concurrency'; +import { task, TaskInstance } from 'ember-concurrency'; import { taskFor } from 'ember-concurrency-ts'; import Intl from 'ember-intl/services/intl'; -import { inject as service } from '@ember/service'; + import InstitutionDepartmentModel from 'ember-osf-web/models/institution-department'; import InstitutionSummaryMetricModel from 'ember-osf-web/models/institution-summary-metric'; +import SearchResultModel from 'ember-osf-web/models/search-result'; + /* import InstitutionSummaryMetricModel from 'ember-osf-web/models/institution-summary-metric'; */ @@ -24,10 +28,17 @@ export interface KpiChartModel { title: string; chartData: ChartDataModel[]; chartType: string; + taskInstance?: TaskInstance; } +const licenseIndex = 4; +const addonIndex = 5; +const regionIndex = 6; + export default class ChartKpiWrapperComponent extends Component { @service intl!: Intl; + @service store!: Store; + @tracked model = this.args.model; @tracked kpiCharts = [] as KpiChartModel[]; @tracked isLoading = true; @@ -50,6 +61,11 @@ export default class ChartKpiWrapperComponent extends Component { const metrics = await this.model; + const getLicenseTask = taskFor(this.getShareData).perform('rights', licenseIndex, 'licenses', 'bar'); + const getAddonsTask = taskFor(this.getShareData).perform('hasOsfAddon', addonIndex, 'add-ons', 'bar'); + const getRegionTask = taskFor(this.getShareData) + .perform('storageRegion', regionIndex, 'storage-regions', 'doughnut'); + this.kpiCharts.push( { title: this.intl.t('institutions.dashboard.kpi-chart.users-by-department'), @@ -73,23 +89,21 @@ export default class ChartKpiWrapperComponent extends Component { - licenseData.push( - { - label: metric.name, - total: metric.numberOfUsers, - } as ChartDataModel, - ); + @task + @waitFor + private async getShareData( + propertyPath: string, + index: number, + translationKey: string, + graphType?: string, + ) { + const valueSearch = await this.store.queryRecord('index-value-search', { + cardSearchFilter: { + affiliation: this.args.model.institution.iris.join(','), + }, + sort: '-relevance', + 'page[size]': 10, + valueSearchPropertyPath: propertyPath, }); - return licenseData; - } - - /** - * calculateAddons - * - * @description Abstracted method to build the ChartData model for add-ons - * @param addonMetrics The add-on metrics object - * - * @returns The add-ons ChartData model - */ - private calculateAddons(addonMetrics: InstitutionDepartmentModel[]): ChartDataModel[] { - const addonData = [] as ChartDataModel[]; + const resultPage = valueSearch.searchResultPage.toArray(); - addonMetrics.forEach((metric: InstitutionDepartmentModel ) => { - addonData.push( - { - label: metric.name, - total: metric.numberOfUsers, - } as ChartDataModel, - ); + let runningTotal = 0; + const chartData = resultPage.map((result: SearchResultModel) => { + runningTotal += result.cardSearchResultCount; + return { + label: result.indexCard.get('label'), + total: result.cardSearchResultCount, + }; }); - return addonData; - } - /** - * calculateStorageRegions - * - * @description Abstracted method to build the Storage Regions ChartData - * @param storageRegionsMetrics The storage regions metrics object - * - * @returns The storage regions ChartData model - */ - private calculateStorageRegions(storageRegionsMetrics: InstitutionDepartmentModel[]): ChartDataModel[] { - const storageRegionsData = [] as ChartDataModel[]; + if (runningTotal < valueSearch.totalResultCount) { + chartData.push({ + label: this.intl.t('general.other'), + total: valueSearch.totalResultCount - runningTotal, + }); + } - storageRegionsMetrics.forEach((metric: InstitutionDepartmentModel ) => { - storageRegionsData.push( - { - label: metric.name, - total: metric.numberOfUsers, - } as ChartDataModel, - ); - }); - return storageRegionsData; - } + const kpiChartObject = { + title: this.intl.t('institutions.dashboard.kpi-chart.' + translationKey), + chartData, + chartType: graphType ? graphType : 'bar', - /** - * calculateDataStorage - * - * @description Abstracted method to calculate the private and public data storage - * @param summaryMetrics The institutional summary metrics object - * - * @returns The total of private and public data storage - */ - private calculateDataStorage(summaryMetrics: InstitutionSummaryMetricModel): ChartDataModel[] { - return [ - { - label: this.intl.t('institutions.dashboard.kpi-chart.public-vs-private-data-storage.public'), - total: summaryMetrics.storageByteCount, - } as ChartDataModel, - { - label: this.intl.t('institutions.dashboard.kpi-chart.public-vs-private-data-storage.private'), - total: summaryMetrics.storageByteCount + 100, - } as ChartDataModel, - ]; + }; + this.kpiCharts[index] = kpiChartObject; + + this.kpiCharts = [...this.kpiCharts]; // re-set the array to trigger a re-render } } - - diff --git a/translations/en-us.yml b/translations/en-us.yml index 742cf13288..71cfbb0949 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -859,6 +859,7 @@ institutions: title: 'Public vs Private Data Storage' public: 'Public Data Storage' private: 'Private Data Storage' + error: 'Error loading data' object-list: filter-button-label: 'Filter' filter-heading: 'Filter by:' diff --git a/types/ember-cli-chart.d.ts b/types/ember-cli-chart.d.ts index 93d77cdeae..6d027a67b1 100644 --- a/types/ember-cli-chart.d.ts +++ b/types/ember-cli-chart.d.ts @@ -20,14 +20,18 @@ declare module 'ember-cli-chart' { xAxes?: [ { display?: boolean + ticks?: { + min?: number + } } - ], yAxes?: [ { display?: boolean + ticks?: { + min?: number + } } - ] } } From 30b128673c8fa1590bc7789a8abca68ff4683b3c Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Tue, 22 Oct 2024 16:28:18 -0400 Subject: [PATCH 3/8] Update tests; Remove faulty "other" category --- .../chart-kpi-wrapper/component-test.ts | 67 +++++-------------- .../chart-kpi-wrapper/component.ts | 19 ++---- 2 files changed, 20 insertions(+), 66 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts index 5603074b0f..034ba148a7 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts @@ -32,6 +32,9 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper numberOfUsers: 37, }, ], + institution: { + iris: ['bleh'], + }, }); this.set('model', model); @@ -225,22 +228,21 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper // And the expanded data position 0 name is verified assert.dom(`${parentDom} [data-test-expanded-name="0"]`) - .hasText('Math'); + .exists(); // And the expanded data position 0 total is verified assert.dom(`${parentDom} [data-test-expanded-total="0"]`) - .hasText('25'); + .hasText('3'); // And the expanded data position 1 name is verified assert.dom(`${parentDom} [data-test-expanded-name="1"]`) - .hasText('Science'); + .exists(); // And the expanded data position 1 total is verified assert.dom(`${parentDom} [data-test-expanded-total="1"]`) - .hasText('37'); + .hasText('2'); - // Finally there are only 2 expanded data points - assert.dom(`${parentDom} [data-test-expanded-name="2"]`) + assert.dom(`${parentDom} [data-test-expanded-total="2"]`) .doesNotExist(); }); @@ -261,19 +263,19 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper // And the expanded data position 0 name is verified assert.dom(`${parentDom} [data-test-expanded-name="0"]`) - .hasText('Math'); + .exists(); // And the expanded data position 0 total is verified assert.dom(`${parentDom} [data-test-expanded-total="0"]`) - .hasText('25'); + .hasText('3'); // And the expanded data position 1 name is verified assert.dom(`${parentDom} [data-test-expanded-name="1"]`) - .hasText('Science'); + .exists(); // And the expanded data position 1 total is verified assert.dom(`${parentDom} [data-test-expanded-total="1"]`) - .hasText('37'); + .hasText('2'); // Finally there are only 2 expanded data points assert.dom(`${parentDom} [data-test-expanded-name="2"]`) @@ -297,56 +299,19 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper // And the expanded data position 0 name is verified assert.dom(`${parentDom} [data-test-expanded-name="0"]`) - .hasText('Math'); - - // And the expanded data position 0 total is verified - assert.dom(`${parentDom} [data-test-expanded-total="0"]`) - .hasText('25'); - - // And the expanded data position 1 name is verified - assert.dom(`${parentDom} [data-test-expanded-name="1"]`) - .hasText('Science'); - - // And the expanded data position 1 total is verified - assert.dom(`${parentDom} [data-test-expanded-total="1"]`) - .hasText('37'); - - // Finally there are only 2 expanded data points - assert.dom(`${parentDom} [data-test-expanded-name="2"]`) - .doesNotExist(); - }); - - test('it calculates the Public vs Private Data Storage data correctly', async function(assert) { - // Given the component is rendered - await render(hbs` - -`); - const parentDom = '[data-test-kpi-chart="7"]'; - - // When I click the expanded icon - await click(`${parentDom} [data-test-expand-additional-data]`); - - // And the title is verified - assert.dom(`${parentDom} [data-test-chart-title]`) - .hasText('Public vs Private Data Storage'); - - // And the expanded data position 0 name is verified - assert.dom(`${parentDom} [data-test-expanded-name="0"]`) - .hasText('Public Data Storage'); + .exists(); // And the expanded data position 0 total is verified assert.dom(`${parentDom} [data-test-expanded-total="0"]`) - .hasText('2000'); + .hasText('3'); // And the expanded data position 1 name is verified assert.dom(`${parentDom} [data-test-expanded-name="1"]`) - .hasText('Private Data Storage'); + .exists(); // And the expanded data position 1 total is verified assert.dom(`${parentDom} [data-test-expanded-total="1"]`) - .hasText('2100'); + .hasText('2'); // Finally there are only 2 expanded data points assert.dom(`${parentDom} [data-test-expanded-name="2"]`) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index de73f43d4c..a2dde84051 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -228,21 +228,10 @@ export default class ChartKpiWrapperComponent extends Component { - runningTotal += result.cardSearchResultCount; - return { - label: result.indexCard.get('label'), - total: result.cardSearchResultCount, - }; - }); - - if (runningTotal < valueSearch.totalResultCount) { - chartData.push({ - label: this.intl.t('general.other'), - total: valueSearch.totalResultCount - runningTotal, - }); - } + const chartData = resultPage.map((result: SearchResultModel) => ({ + total: result.cardSearchResultCount, + label: result.indexCard.get('label'), + })); const kpiChartObject = { title: this.intl.t('institutions.dashboard.kpi-chart.' + translationKey), From 48939e3d09b591d2bfe0b5fae6c0e00c0594b9c2 Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Tue, 22 Oct 2024 16:32:36 -0400 Subject: [PATCH 4/8] Update comment --- .../dashboard/-components/chart-kpi-wrapper/component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index a2dde84051..96951c55b2 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -207,8 +207,7 @@ export default class ChartKpiWrapperComponent extends Component Date: Wed, 23 Oct 2024 10:49:38 -0400 Subject: [PATCH 5/8] CR comment; fix object-type graph --- .../dashboard/-components/chart-kpi-wrapper/component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index 96951c55b2..35823641ca 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -166,7 +166,7 @@ export default class ChartKpiWrapperComponent extends Component Date: Wed, 23 Oct 2024 11:26:52 -0400 Subject: [PATCH 6/8] CR comment: refactor charts getting data from SHARE --- .../chart-kpi-wrapper/chart-kpi/component.ts | 21 ++++++---- .../chart-kpi-wrapper/component.ts | 40 +++++-------------- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts index 555f1ea3fd..4242e3de92 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts @@ -85,21 +85,26 @@ export default class ChartKpi extends Component { get chartData(): ChartData { const backgroundColors = [] as string[]; const data = [] as number[]; - const labels = [] as string[]; + const labels = [] as string[]; + const { taskInstance, chartData } = this.args.data; - this.args.data.chartData.map((chartData: ChartDataModel, $index: number) => { + let rawData = chartData ? chartData : []; + if (taskInstance) { + if (taskInstance.value) { + rawData = taskInstance.value; + } + } + rawData.map((rawChartData: ChartDataModel, $index: number) => { backgroundColors.push(this.getColor($index)); - data.push(chartData.total); - labels.push(chartData.label); - + data.push(rawChartData.total); + labels.push(rawChartData.label); this.expandedData.push({ - name: chartData.label, - total: chartData.total, + name: rawChartData.label, + total: rawChartData.total, color: this.getColor($index), }); }); - return { labels, datasets: [{ diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index 35823641ca..7370101b69 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -26,15 +26,12 @@ interface TotalCountChartWrapperArgs { export interface KpiChartModel { title: string; - chartData: ChartDataModel[]; chartType: string; + // Either chartData or taskInstance should be defined + chartData?: ChartDataModel[]; taskInstance?: TaskInstance; } -const licenseIndex = 4; -const addonIndex = 5; -const regionIndex = 6; - export default class ChartKpiWrapperComponent extends Component { @service intl!: Intl; @service store!: Store; @@ -61,10 +58,10 @@ export default class ChartKpiWrapperComponent extends Component { const metrics = await this.model; - const getLicenseTask = taskFor(this.getShareData).perform('rights', licenseIndex, 'licenses', 'bar'); - const getAddonsTask = taskFor(this.getShareData).perform('hasOsfAddon', addonIndex, 'add-ons', 'bar'); + const getLicenseTask = taskFor(this.getShareData).perform('rights'); + const getAddonsTask = taskFor(this.getShareData).perform('hasOsfAddon'); const getRegionTask = taskFor(this.getShareData) - .perform('storageRegion', regionIndex, 'storage-regions', 'doughnut'); + .perform('storageRegion'); this.kpiCharts.push( { @@ -89,19 +86,16 @@ export default class ChartKpiWrapperComponent extends Component { const valueSearch = await this.store.queryRecord('index-value-search', { cardSearchFilter: { affiliation: this.args.model.institution.iris.join(','), @@ -226,19 +216,9 @@ export default class ChartKpiWrapperComponent extends Component ({ + return resultPage.map((result: SearchResultModel) => ({ total: result.cardSearchResultCount, label: result.indexCard.get('label'), })); - - const kpiChartObject = { - title: this.intl.t('institutions.dashboard.kpi-chart.' + translationKey), - chartData, - chartType: graphType ? graphType : 'bar', - - }; - this.kpiCharts[index] = kpiChartObject; - - this.kpiCharts = [...this.kpiCharts]; // re-set the array to trigger a re-render } } From 904354dc493bb1334222a4e44cae678bf544f4fd Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Wed, 23 Oct 2024 11:37:56 -0400 Subject: [PATCH 7/8] Update test --- .../dashboard/-components/chart-kpi-wrapper/component-test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts index 034ba148a7..c12c97d485 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component-test.ts @@ -19,7 +19,7 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper publicProjectCount: 20, publicRegistrationCount: 100, embargoedRegistrationCount: 200, - preprintCount: 1000, + publishedPreprintCount: 1000, storageByteCount: 2000, }, departmentMetrics: [ From cf667aec36062fded7d733fc032eef49996b8dfb Mon Sep 17 00:00:00 2001 From: Futa Ikeda Date: Wed, 23 Oct 2024 13:16:23 -0400 Subject: [PATCH 8/8] CR Feedback --- .../chart-kpi-wrapper/chart-kpi/component.ts | 10 +++------- .../-components/chart-kpi-wrapper/component.ts | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts index 4242e3de92..252b2978d9 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/chart-kpi/component.ts @@ -88,13 +88,9 @@ export default class ChartKpi extends Component { const labels = [] as string[]; const { taskInstance, chartData } = this.args.data; - let rawData = chartData ? chartData : []; - if (taskInstance) { - if (taskInstance.value) { - rawData = taskInstance.value; - } - } - rawData.map((rawChartData: ChartDataModel, $index: number) => { + const rawData = taskInstance?.value || chartData || []; + + rawData.forEach((rawChartData: ChartDataModel, $index: number) => { backgroundColors.push(this.getColor($index)); data.push(rawChartData.total); diff --git a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts index 7370101b69..4bc74e2cdb 100644 --- a/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts +++ b/app/institutions/dashboard/-components/chart-kpi-wrapper/component.ts @@ -29,7 +29,7 @@ export interface KpiChartModel { chartType: string; // Either chartData or taskInstance should be defined chartData?: ChartDataModel[]; - taskInstance?: TaskInstance; + taskInstance?: TaskInstance; } export default class ChartKpiWrapperComponent extends Component {