@@ -12,7 +12,11 @@ import Empty from '../../../components/Empty';
1212import ResizableGridLayout , { serialize } from '../../../layout/ResizableGridLayout' ;
1313import ResizableGridCard from '../../../layout/ResizableGridLayout/ResizableGridCard' ;
1414import { TDownloadDictionary } from '../../../layout/ResizableGridLayout/ResizableGridCard/utils' ;
15- import { mondoDefaultGridConfig , observedPhenotypeDefaultGridConfig } from '../../../layout/ResizableGridLayout/utils' ;
15+ import {
16+ formatAggregationChartData ,
17+ mondoDefaultGridConfig ,
18+ observedPhenotypeDefaultGridConfig ,
19+ } from '../../../layout/ResizableGridLayout/utils' ;
1620import { truncateString } from '../../../utils/stringUtils' ;
1721
1822import entityTableStyles from '../EntityTable/index.module.css' ;
@@ -332,7 +336,7 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
332336 tsvSettings = { {
333337 contentMap : [ 'label' , 'value' ] ,
334338 data : [ phenotypesData ] ,
335- headers : [ 'Value ' , 'Count' ] ,
339+ headers : [ 'Phenotype (HPO) ' , 'Count' ] ,
336340 } }
337341 { ...resizableCardSettings }
338342 />
@@ -430,7 +434,7 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
430434 tsvSettings = { {
431435 contentMap : [ 'label' , 'value' ] ,
432436 data : [ mondoData ] ,
433- headers : [ 'Value ' , 'Count' ] ,
437+ headers : [ 'Diagnosis (MONDO) ' , 'Count' ] ,
434438 } }
435439 { ...resizableCardSettings }
436440 />
@@ -570,7 +574,17 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
570574 }
571575 theme = "shade"
572576 tsvSettings = { {
573- data : [ statistic . demography . sex , statistic . demography . race , statistic . demography . ethnicity ] ,
577+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
578+ data : [
579+ formatAggregationChartData ( statistic . demography . sex ) ,
580+ formatAggregationChartData ( statistic . demography . race ) ,
581+ formatAggregationChartData ( statistic . demography . ethnicity ) ,
582+ ] ,
583+ headers : [
584+ [ 'Sex' , 'Count' , 'Frequency' ] ,
585+ [ 'Race' , 'Count' , 'Frequency' ] ,
586+ [ 'Ethnicity' , 'Count' , 'Frequency' ] ,
587+ ] ,
574588 } }
575589 { ...resizableCardSettings }
576590 />
@@ -640,7 +654,9 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
640654 theme = "shade"
641655 titleTruncateThresholdWidth = { 100 }
642656 tsvSettings = { {
643- data : [ downSyndromeStatusData ] ,
657+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
658+ data : [ formatAggregationChartData ( downSyndromeStatusData ) ] ,
659+ headers : [ 'Down Syndrome Status' , 'Count' , 'Frequency' ] ,
644660 } }
645661 { ...resizableCardSettings }
646662 />
@@ -710,7 +726,9 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
710726 theme = "shade"
711727 titleTruncateThresholdWidth = { 100 }
712728 tsvSettings = { {
713- data : [ sampleTypeData ] ,
729+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
730+ data : [ formatAggregationChartData ( sampleTypeData ) ] ,
731+ headers : [ 'Sample Type' , 'Count' , 'Frequency' ] ,
714732 } }
715733 { ...resizableCardSettings }
716734 />
@@ -780,7 +798,9 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
780798 theme = "shade"
781799 titleTruncateThresholdWidth = { 100 }
782800 tsvSettings = { {
783- data : [ sampleAvailabilityData ] ,
801+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
802+ data : [ formatAggregationChartData ( sampleAvailabilityData ) ] ,
803+ headers : [ 'Sample Availability' , 'Count' , 'Frequency' ] ,
784804 } }
785805 { ...resizableCardSettings }
786806 />
@@ -893,7 +913,9 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
893913 }
894914 theme = "shade"
895915 tsvSettings = { {
896- data : [ dataCategoryData ] ,
916+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
917+ data : [ formatAggregationChartData ( dataCategoryData ) ] ,
918+ headers : [ 'Data Category' , 'Count' , 'Frequency' ] ,
897919 } }
898920 { ...resizableCardSettings }
899921 />
@@ -1006,7 +1028,9 @@ const getStatisticLayouts = ({ dictionary, statistic, withDownload = true }: get
10061028 }
10071029 theme = "shade"
10081030 tsvSettings = { {
1009- data : [ dataTypeData ] ,
1031+ contentMap : [ 'label' , 'value' , 'frequency' ] ,
1032+ data : [ formatAggregationChartData ( dataTypeData ) ] ,
1033+ headers : [ 'Data Type' , 'Count' , 'Frequency' ] ,
10101034 } }
10111035 { ...resizableCardSettings }
10121036 />
0 commit comments