123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- var myChart_human = echarts.init(document.getElementById('jrbm'));
- option_human = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
-
- grid: {
- top:'10%',
- left: '10%',
- right: '10%',
- bottom: '10%',
- containLabel: true
- },
- xAxis: {
- axisLine:{
- show:false
- },
- axisLabel:{
- show:false
- },
- splitLine:{
- show:false
- },
- },
- yAxis: {
-
- type: 'category',
- data: ['住建局','法院','卫健委','公积金', '民政局','不动产','文旅局'],
- axisLine:{
- lineStyle:{
- color:'#00cdef'
- }
- },
- axisTick:{
- show:false
- },
-
- },
-
-
-
- series : [
- {
- type:'bar',
- barWidth:10,
- itemStyle: { //上方显示数值
- normal: {
- label: {
- show: true, //开启显示
- position: 'insideLeft', //在上方显示
- textStyle: { //数值样式
- color: 'white',
- fontSize: 11
- }
- }
- }
- },
- data:[
- {
- value:10,
-
- itemStyle:{
-
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#00feff'},
- {offset: 0.5, color: '#00feff'},
- {offset: 0.8, color: '#0066cc'},
- {offset: 1, color: '#0066cc'}
- ]
-
- )
- }
- },
- {
- value:20,
- itemStyle:{color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#00ffb9'},
- {offset: 0.5, color: '#26ddbe'},
- {offset: 0.8, color: '#2ebc95'},
- {offset: 1, color: '#2ebc95'}
- ]
-
- )
-
- }
- },
- {
- value:9,
- itemStyle:{
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#fff442'},
- {offset: 0.5, color: '#ffc300'},
- {offset: 0.8, color: '#e4c52a'},
- {offset: 1, color: '#ef8217'}
- ]
-
- )
- }
- },
- {
- value:8,
- itemStyle:{
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#ff9900'},
- {offset: 0.5, color: '#ff9900'},
- {offset: 0.8, color: '#cc6600'},
- {offset: 1, color: '#cc6600'}
- ]
-
- )
- }
- },
- {
- value:7,
- itemStyle:{
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#ff0000'},
- {offset: 0.5, color: '#ff0000'},
- {offset: 0.8, color: '#7f0000'},
- {offset: 1, color: '#7f0000'}
- ]
-
- )
- }
- },
- {
- value:6,
-
- itemStyle:{
-
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#00feff'},
- {offset: 0.5, color: '#00feff'},
- {offset: 0.8, color: '#0066cc'},
- {offset: 1, color: '#0066cc'}
- ]
-
- )
- }
- },
- {
- value:5,
- itemStyle:{color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#00ffb9'},
- {offset: 0.5, color: '#26ddbe'},
- {offset: 0.8, color: '#2ebc95'},
- {offset: 1, color: '#2ebc95'}
- ]
-
- )
-
- }
- },
- {
- value:4,
- itemStyle:{
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#fff442'},
- {offset: 0.5, color: '#ffc300'},
- {offset: 0.8, color: '#e4c52a'},
- {offset: 1, color: '#ef8217'}
- ]
-
- )
- }
- },
- {
- value:3,
- itemStyle:{
- color:new echarts.graphic.LinearGradient
- (
- 1, 0, 0, 1,
- [
- {offset: 0, color: '#ff9900'},
- {offset: 0.5, color: '#ff9900'},
- {offset: 0.8, color: '#cc6600'},
- {offset: 1, color: '#cc6600'}
- ]
-
- )
- }
- },
-
- ]
- }
- ]
-
- };
- myChart_human.setOption(option_human);
|