echarts渐变色报错ReferenceError: echarts is not defined

- 日理万妓 2023-01-13 14:57 257阅读 0赞

在使用echarts渐变色图表的时候报错了:

https://echarts.apache.org/examples/zh/editor.html?c=area-stack-gradient

看到网上也有很多人提问:

https://segmentfault.com/q/1010000012329890

主要就是这句:

  1. color: new echarts.graphic.LinearGradient

new报错了

我改成了这样:

就没有报错了:

20210420170025737.png

主要就是要单独导入echarts

成功:

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzIyMTgyOTg5_size_16_color_FFFFFF_t_70

发表评论

表情:
评论列表 (有 0 条评论,257人围观)

还没有评论,来说两句吧...

相关阅读