Child Monitoring Status
-
+ {/*
+ /> */}
RC Supply Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
Child Monitoring Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
Health Nutrition Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
Correspondence Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
Education Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
SOI Trend
- 0 && (
+
+ )}
+ {/*
+ /> */}
);
diff --git a/client/src/views/Report/GroupedBarChart.js b/client/src/views/Report/GroupedBarChart.js
index abfd544..c79c2f5 100644
--- a/client/src/views/Report/GroupedBarChart.js
+++ b/client/src/views/Report/GroupedBarChart.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { isNotDefined } from '@togglecorp/fujs';
import {
BarChart,
@@ -18,7 +19,7 @@ export default function GroupedBarChart(props) {
} = props;
- if (data.values.length <= 0) {
+ if (isNotDefined(data) || isNotDefined(data.values) || data.values.length <= 0) {
return (
Nothing to show
);
diff --git a/client/src/views/Report/HorizontalBar.js b/client/src/views/Report/HorizontalBar.js
index cb29251..0bf2f7d 100644
--- a/client/src/views/Report/HorizontalBar.js
+++ b/client/src/views/Report/HorizontalBar.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { isNotDefined } from '@togglecorp/fujs';
import {
BarChart,
@@ -18,7 +19,7 @@ export default function HorizontalBar(props) {
colorScheme,
} = props;
- if (data.length <= 0) {
+ if (isNotDefined(data) || data.length <= 0) {
return (
Nothings to show.
diff --git a/client/src/views/Report/index.js b/client/src/views/Report/index.js
index 4a08cc8..860a523 100644
--- a/client/src/views/Report/index.js
+++ b/client/src/views/Report/index.js
@@ -38,7 +38,7 @@ import {
triColorScheme,
} from './report-utils';
-import DonutChartReCharts from './DonutChart';
+import DonutChartReCharts from '../CommonCharts/DonutChart';
import HorizontalBarRecharts from './HorizontalBar';
import GroupedBarChartRecharts from './GroupedBarChart';
@@ -560,7 +560,7 @@ class Report extends PureComponent {