Open xwbxxx opened 1 year ago
如图所示,react 5.1新增了resize动画的功能
这是我的代码,我应该如何在echarts-for-react v3.0.2中调用这个新功能?
import React from 'react'; import '../element/App.css'; import ReactEcharts from "echarts-for-react"; export default function EchartPanel() { const bar = () => { const option = { // echart option }; return option; } return (<div className={'EchartPanel'}> <ReactEcharts option={bar()}/> </div>); }
const chartInst: any = chartRef?.current?.getEchartsInstance(); chartInst.resize({ width : 300 });
如图所示,react 5.1新增了resize动画的功能
这是我的代码,我应该如何在echarts-for-react v3.0.2中调用这个新功能?