Created
August 24, 2017 00:16
-
-
Save lnlsn/c11ea0bc6f5103a56ad8cbc51af41c6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dom = document.getElementById("container"); | |
var myChart = echarts.init(dom); | |
var app = {}; | |
option = null; | |
var itemStyleInside = { | |
normal: { | |
label: { | |
position: 'inside', | |
show:true, | |
formatter: '{insideText|{a}: {c}}', | |
rich: { | |
insideText: { | |
color: '#222', | |
fontWeight: 'bold' | |
} | |
} | |
}, | |
} | |
}; | |
var itemStyleTotal = { | |
normal: { | |
color: '#000', | |
fontWeight: 'bold', | |
label: { | |
show: true, | |
position: 'top', | |
formatter: '{b}: {c}' | |
} | |
} | |
}; | |
option = { | |
title: { | |
x: 'center', | |
text: 'Backlog ', | |
subtext: 'Volume por Grupos' | |
}, | |
color : ['#FFD600', '#E7E1B6', '#FAA936', '#EBECEA', '#B9F762', '#C6E0ED', '#EE383A', '#287FAD', '#9FBD70'], | |
tooltip : { | |
show: false, | |
trigger: 'axis', | |
axisPointer : { | |
type : 'shadow' | |
} | |
}, | |
legend: { | |
position: 'bottom', | |
data:['Portal','N1','FC', 'FI','RH','LOJA-AVA', 'LOJA-TAS','04TT','DTI'], | |
show: false | |
}, | |
grid: { | |
left: '3%', | |
right: '4%', | |
bottom: '3%', | |
containLabel: true | |
}, | |
xAxis : [ | |
{ | |
type : 'category', | |
data : ['Filas'], | |
show: false | |
} | |
], | |
yAxis : [ | |
{ | |
type : 'value', | |
data: ['Qtde'], | |
show: false | |
} | |
], | |
series : [ | |
{ | |
name:'Portal', | |
type:'bar', | |
stack: 'GF1', | |
itemStyle: itemStyleInside, | |
data:[15], | |
markPoint : { | |
symbol: 'pin', | |
symbolSize: [1,1], | |
data : [ | |
{name : 'Total N1P', yAxis: 25, value: 25} | |
], | |
itemStyle: itemStyleTotal | |
} | |
}, | |
{ | |
name:'N1', | |
type:'bar', | |
stack: 'GF1', | |
itemStyle: itemStyleInside, | |
data:[10] | |
}, | |
{ | |
name:'FC', | |
type:'bar', | |
stack: 'GF2', | |
itemStyle: itemStyleInside, | |
data:[45] | |
}, | |
{ | |
name:'FI', | |
type:'bar', | |
stack: 'GF3', | |
itemStyle: itemStyleInside, | |
data:[41] | |
}, | |
{ | |
name:'RH', | |
type:'bar', | |
stack: 'GF4', | |
itemStyle: itemStyleInside, | |
data:[5] | |
}, | |
{ | |
name:'INF', | |
type:'bar', | |
stack: 'GF5', | |
itemStyle: itemStyleInside, | |
data:[50], | |
markPoint : { | |
data : [ | |
{name : 'LOJA', yAxis: 108, value: 108} | |
], | |
symbolSize: [1,1], | |
itemStyle: itemStyleTotal | |
} | |
}, | |
{ | |
name:'ATIV', | |
type:'bar', | |
stack: 'GF5', | |
itemStyle: itemStyleInside, | |
data:[58] | |
}, | |
{ | |
name:'04TT', | |
type:'bar', | |
stack: 'GF6', | |
itemStyle: itemStyleInside, | |
data:[20], | |
markPoint : { | |
symbol: 'pin', | |
data : [ | |
{name : 'Total', yAxis: 32, value: 32} | |
], | |
symbolSize: [1,1], | |
itemStyle: itemStyleTotal | |
} | |
}, | |
{ | |
name:'DTI', | |
type:'bar', | |
stack: 'GF6', | |
itemStyle: itemStyleInside, | |
data:[12] | |
} | |
] | |
}; | |
; | |
if (option && typeof option === "object") { | |
myChart.setOption(option, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment