@@ -15,6 +15,8 @@ import {
1515import GroupedBarChart from '#rscz/GroupedBarChart' ;
1616import Legend from '#rscz/Legend' ;
1717
18+ import GroupedBarChartRecharts from '../../GroupedBarChart' ;
19+
1820import styles from './styles.scss' ;
1921
2022const propTypes = {
@@ -279,11 +281,11 @@ class TrendSummary extends React.PureComponent {
279281 values,
280282 columns : [
281283 'Total Closed' ,
282- 'Closed On' ,
284+ 'Closed On Time ' ,
283285 ] ,
284286 colors : {
285287 'Total Closed' : '#44df96' ,
286- 'Closed On' : '#c25be2' ,
288+ 'Closed On Time ' : '#c25be2' ,
287289 } ,
288290 } ) ;
289291 } ) ;
@@ -330,7 +332,12 @@ class TrendSummary extends React.PureComponent {
330332 < div className = { _cs ( styles . trend , className ) } >
331333 < div className = { _cs ( styles . item ) } >
332334 < h3 > RC Supply Trend </ h3 >
333- < GroupedBarChart
335+ { rcData . values . length > 0 && (
336+ < GroupedBarChartRecharts
337+ data = { rcData }
338+ />
339+ ) }
340+ { /* <GroupedBarChart
334341 data={rcData}
335342 groupSelector={groupSelector}
336343 lineDataSelector={rcLineSelector}
@@ -342,11 +349,16 @@ class TrendSummary extends React.PureComponent {
342349 keySelector={legendKeySelector}
343350 labelSelector={legendLabelSelector}
344351 colorSelector={legendColorSelector}
345- />
352+ /> */ }
346353 </ div >
347354 < div className = { _cs ( styles . item ) } >
348355 < h3 > Child Monitoring Trend </ h3 >
349- < GroupedBarChart
356+ { childMonitoringData . values . length > 0 && (
357+ < GroupedBarChartRecharts
358+ data = { childMonitoringData }
359+ />
360+ ) }
361+ { /* <GroupedBarChart
350362 data={childMonitoringData}
351363 groupSelector={groupSelector}
352364 lineDataSelector={childMonitoringLineSelector}
@@ -358,11 +370,16 @@ class TrendSummary extends React.PureComponent {
358370 keySelector={legendKeySelector}
359371 labelSelector={legendLabelSelector}
360372 colorSelector={legendColorSelector}
361- />
373+ /> */ }
362374 </ div >
363375 < div className = { _cs ( styles . item ) } >
364376 < h3 > Health Nutrition Trend </ h3 >
365- < GroupedBarChart
377+ { healthData . values . length > 0 && (
378+ < GroupedBarChartRecharts
379+ data = { healthData }
380+ />
381+ ) }
382+ { /* <GroupedBarChart
366383 data={healthData}
367384 groupSelector={groupSelector}
368385 showValue
@@ -373,11 +390,16 @@ class TrendSummary extends React.PureComponent {
373390 keySelector={legendKeySelector}
374391 labelSelector={legendLabelSelector}
375392 colorSelector={legendColorSelector}
376- />
393+ /> */ }
377394 </ div >
378395 < div className = { _cs ( styles . item ) } >
379396 < h3 > Correspondence Trend </ h3 >
380- < GroupedBarChart
397+ { correspondenceData . values . length > 0 && (
398+ < GroupedBarChartRecharts
399+ data = { correspondenceData }
400+ />
401+ ) }
402+ { /* <GroupedBarChart
381403 data={correspondenceData}
382404 groupSelector={groupSelector}
383405 showValue
@@ -388,11 +410,16 @@ class TrendSummary extends React.PureComponent {
388410 keySelector={legendKeySelector}
389411 labelSelector={legendLabelSelector}
390412 colorSelector={legendColorSelector}
391- />
413+ /> */ }
392414 </ div >
393415 < div className = { _cs ( styles . item ) } >
394416 < h3 > Education Trend </ h3 >
395- < GroupedBarChart
417+ { educationData . values . length > 0 && (
418+ < GroupedBarChartRecharts
419+ data = { educationData }
420+ />
421+ ) }
422+ { /* <GroupedBarChart
396423 data={educationData}
397424 groupSelector={groupSelector}
398425 showValue
@@ -403,11 +430,17 @@ class TrendSummary extends React.PureComponent {
403430 keySelector={legendKeySelector}
404431 labelSelector={legendLabelSelector}
405432 colorSelector={legendColorSelector}
406- />
433+ /> */ }
407434 </ div >
408435 < div className = { _cs ( styles . item ) } >
409436 < h3 > SOI Trend </ h3 >
410- < GroupedBarChart
437+ { soiData . values . length > 0 && (
438+ < GroupedBarChartRecharts
439+ data = { soiData }
440+ />
441+ ) }
442+ { console . log ( 'soiData---' , soiData ) }
443+ { /* <GroupedBarChart
411444 data={soiData}
412445 groupSelector={groupSelector}
413446 showValue
@@ -418,7 +451,7 @@ class TrendSummary extends React.PureComponent {
418451 keySelector={legendKeySelector}
419452 labelSelector={legendLabelSelector}
420453 colorSelector={legendColorSelector}
421- />
454+ /> */ }
422455 </ div >
423456 </ div >
424457 ) ;
0 commit comments