首页 > 其他分享 >echarts圆角柱状图,竖排

echarts圆角柱状图,竖排

时间:2022-09-07 15:23:08浏览次数:80  
标签:color 30 竖排 柱状图 rgba type echarts 255

option = {
    backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    grid: {
        top: '15%',
        right: '3%',
        left: '5%',
        bottom: '12%'
    },
    xAxis: [{
        type: 'category',
        data: ['工作票', '操作票', '抢修', '用电调查', '设备巡视', '现场勘查', '到岗到位'],
        axisLine: {
            lineStyle: {
                color: 'rgba(255,255,255,0.12)'
            }
        },
        axisLabel: {
            margin: 10,
            color: '#e2e9ff',
            textStyle: {
                fontSize: 14
            },
        },
    }],
    yAxis: [{
        axisLabel: {
            formatter: '{value}',
            color: '#e2e9ff',
        },
        axisLine: {
            show: false
        },
        splitLine: {
            lineStyle: {
                color: 'rgba(255,255,255,0.12)'
            }
        }
    }],
    series: [{
        type: 'bar',
        data: [300, 450, 770, 203, 255, 188, 156],
        barWidth: '20px',
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(0,244,255,1)' // 0% 处的颜色
                }, {
                    offset: 1,
                    color: 'rgba(0,77,167,1)' // 100% 处的颜色
                }], false),
                barBorderRadius: [30, 30, 30, 30],
                shadowColor: 'rgba(0,160,221,1)',
                shadowBlur: 4,
            }
        },
        label: {
            normal: {
                show: true,
                lineHeight: 30,
                width: 80,
                height: 30,
                backgroundColor: 'rgba(0,160,221,0.1)',
                borderRadius: 200,
                position: ['-8', '-60'],
                distance: 1,
                formatter: [
                    '    {d|●}',
                    ' {a|{c}}     \n',
                    '    {b|}'
                ].join(','),
                rich: {
                    d: {
                        color: '#3CDDCF',
                    },
                    a: {
                        color: '#fff',
                        align: 'center',
                    },
                    b: {
                        width: 1,
                        height: 30,
                        borderWidth: 1,
                        borderColor: '#234e6c',
                        align: 'left'
                    },
                }
            }
        }
    }]
};

 

标签:color,30,竖排,柱状图,rgba,type,echarts,255
From: https://www.cnblogs.com/facenano/p/16665569.html

相关文章

  • echarts广西省级地图
    varuploadedDataURL='/asset/get/s/data-1619331932890-vGo73FpJO.json';//默认optionoptions={title:{text:'数据集dataset使用示例'},tooltip:{},......
  • 记录echarts升级echarts5.3.0
    转自于:https://zhuanlan.zhihu.com/p/526439319背景为更好地维护项目以及使用v5新特性,把已有项目的eharts3.0/4.0升级v5【升级文档】前期准备推荐一个npm版本检测工具n......
  • echarts爬坑记—怎么让饼图位置右移同时让legend显示百分比操作
    原文链接:echarts爬坑记—怎么让饼图位置右移同时让legend显示百分比操作–每天进步一点点(longkui.site)0.背景echarts的属性太多了,很多效果能实现但是不知道改哪些,只......
  • echarts爬坑记—数组反转reverse导致源数据发生改变
    原文链接:echarts爬坑记—数组反转reverse导致源数据发生改变–每天进步一点点(longkui.site) 0.背景上一篇文章中介绍了echarts让饼图数据和图例位置发生改变的。......
  • echarts实现数据轮播效果
    原文链接:echarts实现数据轮播效果–每天进步一点点(longkui.site) angular怎么实现数据轮播效果呢?echarts要实现数据轮播效果,最终实现效果如下图所示:这篇文章,我们......
  • Vue+Echarts图表自适应
    图表的自适应,挺简单的,但是有几个需要注意的点。1、我们采用addEvenListener()方法,此方法用于向指定元素添加监听事件。且同一元素目标可重复添加,不会覆盖之前相同事件,配合......
  • Spring Boot 2.x基础教程:使用 ECharts 绘制各种华丽的数据图表
    通常,这类需求在客户端应用中不太会用到,但是在后端的各种统计分析模块会经常碰到。比如:通过折线图、柱状图、雷达图等可视化形式,更直观的展现和分析经营状况或系统运行情况......
  • Echarts 多图表共用legend
    //参考地址:https://www.isqqw.com/echartsdetail?id=31404//加载数据functionLoadDataX(){GetApiDataSync2("url",'POST',{......
  • Echarts柱状图渲染进度条效果
    柱状图渲染进度条效果option={yAxis:{type:'category',data:['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],axisTick:{show:fals......
  • echarts-dataset数据源配置项
     如下效果图:   代码入下:letbox4=document.querySelector('.box4')letmyCharts3=echarts.init(box4)myCharts3.setOption({......