Commit bbe74cbe authored by 李纪文's avatar 李纪文

feat: 历史曲线改

parent ba4a6c94
...@@ -268,10 +268,10 @@ const GridChart = memo((props) => { ...@@ -268,10 +268,10 @@ const GridChart = memo((props) => {
}); });
return _options; return _options;
}, [gridData, smooth, curveCenter]); }, [gridData, smooth, curveCenter]);
const chartRef = dataSource.map((item, index) => useRef(null)); // const chartRef = dataSource.map((item, index) => useRef(null));
useEffect(() => { // useEffect(() => {
chartRef.forEach(item => {item?.current?.resize?.()}) // chartRef.forEach(item => {item?.current?.resize?.()})
}, [options]); // }, [options]);
return ( return (
<div className={`${prefixCls}-grid`}> <div className={`${prefixCls}-grid`}>
{options.map((item, index) => { {options.map((item, index) => {
...@@ -294,7 +294,7 @@ const GridChart = memo((props) => { ...@@ -294,7 +294,7 @@ const GridChart = memo((props) => {
isInit ? '' : <PandaEmpty/> isInit ? '' : <PandaEmpty/>
) : ( ) : (
<BasicChart <BasicChart
ref={chartRef[index]} // ref={chartRef[index]}
style={{width: '100%', height: '100%'}} style={{width: '100%', height: '100%'}}
option={item.option} option={item.option}
notMerge notMerge
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment