Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

echart 树图 自定义的 图标 symbol 显示不出来怎么办?

1、这里设置成自定义的 dataURI 运行发现显示不出来,
image.png
2、随便改一行代码发现图片能显示出来了
image.png
3、在步骤2的基础上,点击"运行"按钮发现又显示不出来了
image.png

请问这种情况是因为啥呢, echarts 本身的Bug 还是说设置的有问题呢?有没有什么解决方法吗?

示例链接:
echarts 树图示例

symbol 设置
`

symbol: 'image://data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7',

`

补充:
symbol 显示不出来的时候,如果鼠标点击一下,就可以显示出来了。
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

已解决,经测试,设置 animationDuration 参数为0就可以显示出来自定义的symbol了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...