【echarts】 堆叠柱状图,柱子之间间隔开

https://echarts.zhangmuchen.top/#/detail?cid=85095-9454-8a93-b33d7-999a76a3

js 复制代码
itemStyle: { //柱子颜色
	normal: {
		color: '#4e73de',
		borderColor: "#fff",// 用border做
		borderWidth: 10,
	}
},

具体:

js 复制代码
    option = {
    	backgroundColor: '#fff',
    	title: {
    		text: "策略变更",
    		top: 10,
    		left: 15,
    		textStyle: {
    			color: "#35598d",
    			fontSize: 16,
    			fontWeight: 'normal'
    		}
    	},
    	tooltip: {
    		trigger: 'axis',
    	},
    	grid: {
    		left: '5%',
    		right: '6%',
    		bottom: '3%',
    		top: '20%',
    		containLabel: true
    	},
    	legend: {
    		icon: 'rect',
    		right: "3%",
    		top: 13,
    		itemWidth: 20,
    		itemHeight: 10,
    		textStyle: {
    			color: '#555'
    		},
    		data: ['新增', '修改', '删除']
    	},
    	xAxis: {
    		type: 'category',
    		data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
    		axisLabel: { //坐标轴字体颜色
    			textStyle: {
    				color: '#9eaaba'
    			}
    		},
    		axisLine: {
    			lineStyle: {
    				color: "#e5e5e5"
    			}
    		},
    		axisTick: { //y轴刻度线
    			show: false
    		},
    		splitLine: { //网格
    			show: false,

    		}
    	},
    	yAxis: {
    		type: 'value',
    		axisLabel: { //坐标轴字体颜色
    			textStyle: {
    				color: '#9eaaba'
    			}
    		},
    		axisLine: {
    			show: false,
    		},
    		axisTick: { //y轴刻度线
    			show: false
    		},
    		splitLine: { //网格
    			show: true,
    			lineStyle: {
    				color: '#dadde4',
    				type: "dashed"
    			}
    		}
    	},
    	series: [{
    		name: '新增',
    		type: 'bar',
    		stack: '策略变更',
    		barWidth: '40%', //柱子宽度
    		itemStyle: { //柱子颜色
    			normal: {
    				color: '#4e73de',
    				borderColor: "#fff",
    				borderWidth: 10,
    			}
    		},
    		data: [232, 193, 240, 214, 239, 223, 202]
    	}, {
    		name: '修改',
    		type: 'bar',
    		stack: '策略变更',
    		barWidth: '40%', //柱子宽度
    		itemStyle: { //柱子颜色
    			normal: {
    				color: '#2dafeb',
    				borderColor: "#fff",
    				borderWidth: 10,
    			}
    		},
    		data: [320, 332, 301, 334, 390, 330, 320]
    	}, {
    		name: '删除',
    		type: 'bar',
    		stack: '策略变更',
    		barWidth: '40%', //柱子宽度
    		itemStyle: { //柱子颜色
    			normal: {
    				color: '#35c68d',
    				borderColor: "#fff",
    				borderWidth: 10,
    			}
    		},
    		data: [60, 82, 51, 94, 100, 68, 74]
    	}]
    };
相关推荐
两个西柚呀13 分钟前
未在props中声明的属性
前端·javascript·vue.js
子伟-H53 小时前
App开发框架调研对比
前端
桃子不吃李子3 小时前
axios的二次封装
前端·学习·axios
SteveJrong3 小时前
面试题 - JavaScript
前端·javascript·面试·ecmascript·基础·找工作·红宝书
阿金要当大魔王~~3 小时前
uniapp 页面标签 传值 ————— uniapp 定义 接口
前端·javascript·uni-app·1024程序员节
全栈软件开发3 小时前
uniapp三端影视源码苹果cms自动采集电影视频网站源码前端源码带VIP
前端·uni-app·影视源码
chxii4 小时前
10.4FormData :前端文件上传与表单数据处理的核心工具
前端
AntBlack4 小时前
不当韭菜 : 好像真有点效果 ,想藏起来自己用了
前端·后端·python
楊无好4 小时前
react中props的使用
前端·react.js·前端框架
一个处女座的程序猿O(∩_∩)O4 小时前
Vue-Loader 深度解析:原理、使用与最佳实践
前端·javascript·vue.js