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
678 views
in Technique[技术] by (71.8m points)

echarts柱状图选中 颜色循环

echarts的选中效果做出来了,
需求是最多只能选中五个,选中第六个的时候第一个自动取消选中
颜色也是五个颜色循环

求求求求求求求求求!
image.png
选中代码如图,第一个点击事件是echarts的,第二个是option里的series设置选中颜色的


最多五个和颜色循环解决了
新的问题是取消的数组id无法获取到
我的数组是[0,1,2,3,4] 取消选中了下标为[0,2,3]的柱子
再次点击其他柱子时变成[1,4,0,2,3]
筛选不出来


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

1 Answer

0 votes
by (71.8m points)
等待大神解答

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

...