chore: models list re-render

This commit is contained in:
jialin
2024-07-05 18:51:13 +08:00
parent 8c66c482b2
commit b753528e44
38 changed files with 810 additions and 657 deletions
+6 -2
View File
@@ -8,6 +8,7 @@ import {
xAxis,
yAxis
} from '@/components/echarts/config';
import EmptyData from '@/components/empty-data';
import _ from 'lodash';
import { memo } from 'react';
import { ChartProps } from './types';
@@ -19,10 +20,13 @@ const LineChart: React.FC<ChartProps> = (props) => {
height,
width,
labelFormatter,
legendData,
legendData = [],
smooth,
title
} = props;
if (!seriesData.length) {
return <EmptyData height={height} title={title}></EmptyData>;
}
const options = {
title: {
@@ -42,7 +46,7 @@ const LineChart: React.FC<ChartProps> = (props) => {
yAxis,
legend: {
...legend,
data: []
data: legendData
},
series: []