目录
react-chart(chart.js)
检查注释导入
需要导入相关的插件或者使用afterDatasetsDraw
钩子函数来手动绘制标记(marker)
import Chart from 'chart.js';
import annotationPlugin from 'chartjs-plugin-annotation';
Chart.plugins.register(annotationPlugin);
检查版本
解决
Bash |
Bash |
如果后续还有非基本需求,推荐换个可视化库