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

echart 修改颜色后,鼠标悬浮bar消失闪烁

代码如下,官方的例子中加入了color: ["#F0B40FFF"]后,鼠标悬浮在柱上时,柱闪烁。

官方例子地址 https://echarts.apache.org/examples/zh/editor.html?c=bar-simple

option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    color: ["#F0B40FFF"],
    series: [{
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar'
    }]
};

效果图如下:
20200512_104800.gif


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

1 Answer

0 votes
by (71.8m points)

你要带透明度就老实用rgba#F0B40FFF这是什么鬼,4个占位的16进制颜色?没看过这个项目源码,猜测是内部解析这个color计算出现异常


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

...