echarts调整柱状图

// 柱状图颜色
series:[
	itemStyle:{
		normal:{
			color:'#ffffff'
		}
	}
]

// 柱状图颜色渐变
itemStyle:{
	normal:{
		color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
			{
				offset: 0,
				color: "red" // 0% 处的颜色
			},
	    	{
				offset: 1,
				color: "yellow" // 100% 处的颜色
			}
		], false)
	}
}
// 横坐标每单位显示多个柱状图
series: [
			{
				name:'柱状图名称',
				type:'bar',
				data:[2.0, 4.9, 7.0, 23.2],  // 横坐标单位
				itemStyle:{
					normal:{
						color:'#00e4ff'
					}
				}
			},
			{
				name:'柱状图名称',
				type:'bar',
				data:[2.6, 5.9, 9.0, 26.4],  // 横坐标单位
				itemStyle:{
					normal:{
						color:'#a259ff'
					}
				}
			},
			//...
		]

版权声明:本文为u012597989原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。