继续阅读百度柱状图之曲顶柱状图">百度柱状图之曲顶柱状图 - Echarts可视化教程继续阅读百度柱状图之曲顶柱状图" />

Echarts可视化教程

  1. 网站首页
  2. 百度ECharts
  3. ECharts实例
  4. ECharts入门
  5. 地图大全
  6. ECharts官网

百度柱状图之曲顶柱状图

下面介绍一个百度echarts不一样的柱状图——曲顶柱状图

var charts = echarts.init(document.getElementById('charts'));
pictorialBarOption = {
	title: {
		text: '曲顶柱状图',
		textStyle: {
			color: '#fff',
			fontSize: 17,
			fontWeight: 100
		}
	},
	grid: {
		top: '23%',
		bottom: '20%',
		containLabel: true
	},
	tooltip: {
		trigger: 'axis',
		axisPointer: {
			type: 'none'
		},
		formatter: function(params) {
			return params[0].name + ': ' + params[0].value;
		}
	},
	xAxis: {
		data: ["门诊", "住院", "急诊", "体检", "绿检"],
		axisTick: {
			show: false
		},
		axisLine: {
			lineStyle: {
				color: 'rgba(255, 129, 109,.1)',
				width: 1 //这里是为了突出显示加上的
			}
		},
		axisLabel: {
			textStyle: {
				color: '#eaedfc',
				fontSize: 12
			}
		}
	},
	yAxis: {
		splitLine: {
			show: false
		},
		axisTick: {
			show: false
		},
		axisLine: {
			show: false
		},
		axisLabel: {
			show: false
		}
	},
	color: ['#e54035'],
	series: [{
		name: 'hill',
		type: 'pictorialBar',
		barCategoryGap: '-130%',
		symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
		label: {
			show: true,
			position: 'top',
			distance: 4,
			color: '#eaedfc',
			// fontWeight: 'bolder',
			fontSize: 12
		},
		itemStyle: {
			normal: {
				color: {
					type: 'linear',
					x: 0,
					y: 0,
					x2: 0,
					y2: 1,
					colorStops: [{
							offset: 0,
							color: 'rgba(254, 42, 62,0.85)'
						},
						{
							offset: 1,
							color: 'rgba(255, 126, 49,0.85)'
						}
					],
					global: false
				}
			},
			emphasis: {
				opacity: 1
			}
		},
		data: [12312,53322,65432,88744,78654],
		z: 10
	}]
};
charts.setOption(pictorialBarOption);
window.addEventListener("resize", function () {
	charts.resize();
})
点击展开全文

相关文章

  1. 百度Echarts图表之柱状图+折线图组合系列
  2. 百度Echarts柱状图系列之自定义设计
  3. 百度Echarts柱状图系列之灯塔
  4. 百度Echarts柱状图系列之3d自定义效果
  5. 百度Echarts柱状图系列之自定义效果