echarts柱状图(多色柱状图+标注)

option = {
    title: {
        text: '2021年1月13日张三病历',
        subtext: '纯属虚构'
    },
     tooltip: {
    },
    xAxis: {
        type: 'category',
        data: ['R', 'K', 'MA', 'G', 'EPL', 'LY30', 'Angle']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [24, 44, 38, 83, 70, 69, 13],
        type: 'bar',
         itemStyle: {
                    normal: {
              //好,这里就是重头戏了,定义一个list,然后根据所以取得不同的值,这样就实现了,
                        color: function(params) {
                            // build a color map as your need.
                            var colorList &#
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务