如何在ChartJs函数的onClick函数上抓取angular component?有什么办法吗?因为this是图表,所以self窗口... ? 我的图表就像这样添加到some.component.ts中 @ViewChild(Chart) mainChart: Chart // declaration on public variableson component.ts
// construction of <e
我试图将setChart传递给ChartType,并希望在ChartType组件中更新setChart。因此,我尝试使用带null的数组,但由于某些原因,我得到了以下错误:TypeError: setChart is not a function,那么我如何更新setChart以用不同的div更改图表?ChartTypePageconst [chart, setChart] = useState([={chartItself