开发者社区 问答 正文

echarts 热力图数据指定颜色无效 - echarts报错

"

我看官方文档支持对不同的数据设置不同的颜色,但是我为指定的数据设置黄色和绿色没有正常显示?这是为什么?
调试地方:<a href=""http://echarts.baidu.com/demo.html#heatmap-cartesian"" target=""_blank"" rel=""nofollow"">http://echarts.baidu.com/demo...
我使用的series数据如下

series: [{ name: 'Punch Card', type: 'heatmap', data: [{ value:[0,0,10], itemStyle:{normal:{ color:'green', }, emphasis:{ color:'yellow' } } },{ value:[1,2,30],

    },{value:[1,1,90]},{value:[2,1,15]}
    ],
    label: {
        normal: {
            show: true
        }
    },
    itemStyle: {
        emphasis: {
            color:'green',
            shadowBlur: 10,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
    }
}]</code></pre> 

 

"

展开
收起
montos 2020-06-03 15:47:16 1125 分享 版权
1 条回答
写回答
取消 提交回答