我安裝了插件 chartist-plugin-legend。我想在我的圖表中添加圖例,但出現錯誤“Chartist”未定義 no-undef。我如何將圖例添加到圖表中?import ChartistGraph from 'react-chartist';import ChartistTooltip from 'chartist-plugin-tooltips-updated';const options = { plugins: [ Chartist.plugins.legend(), ChartistTooltip({ anchorToPoint: false, appendToBody: true, seriesName: false, }), ],};<ChartistGraph className='ct-chart-line' data={data} options={options} type='Line'/>
在 react-chartist 中將圖例添加到圖表
鴻蒙傳說
2022-12-29 09:35:21