diff --git a/client/src/pages/Dashboard/Components/MainChartCard.tsx b/client/src/pages/Dashboard/Components/MainChartCard.tsx index bfa0b506..d64eeaf3 100644 --- a/client/src/pages/Dashboard/Components/MainChartCard.tsx +++ b/client/src/pages/Dashboard/Components/MainChartCard.tsx @@ -1,7 +1,9 @@ +import { LoadingOutlined } from '@ant-design/icons'; import { Card, Col, DatePicker, + Flex, Row, Select, Tabs, @@ -83,9 +85,7 @@ const MainChartCard: React.FC = ({}) => { console.log('fetch data failed', error); }); } - setTimeout(() => { - setLoading(false); - }, 5000); + setLoading(false); }; useEffect(() => { @@ -96,13 +96,21 @@ const MainChartCard: React.FC = ({}) => { const config = { data: graphData, // Waiting for https://github.com/ant-design/ant-design-charts/issues/2580 - //loading: loading, + loading: loading, animate: { enter: { type: 'waveIn' } }, theme: { view: { viewFill: '#151921', }, }, + loadingTemplate: ( + + + + ), xField: 'date', yField: 'value', colorField: 'name',