You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.8 KiB
74 lines
1.8 KiB
3 years ago
|
// 象形
|
||
|
export default function pictographicOption(dRegion = [], dValue = [], dSum = 0) {
|
||
|
return {
|
||
|
textStyle: {
|
||
|
|
||
|
},
|
||
|
tooltip: {
|
||
|
trigger: "item",
|
||
|
backgroundColor: "#08182F",
|
||
|
color: "#fff",
|
||
|
borderColor: "#3373CC",
|
||
|
textStyle: {
|
||
|
color: "#fff", //设置文字颜色
|
||
|
fontSize: 9
|
||
|
},
|
||
|
},
|
||
|
xAxis: {
|
||
|
show: false,
|
||
|
type: 'value'
|
||
|
},
|
||
|
yAxis: {
|
||
|
data: dRegion,
|
||
|
inverse: true,
|
||
|
axisTick: {
|
||
|
show: false
|
||
|
},
|
||
|
axisLine: {
|
||
|
show: false
|
||
|
},
|
||
|
axisLabel: {
|
||
|
margin: 10,
|
||
|
color: '#333333',
|
||
|
fontSize: 12
|
||
|
}
|
||
|
},
|
||
|
grid: {
|
||
|
height: 186,
|
||
|
width: '50%',
|
||
|
left: 'center',
|
||
|
},
|
||
|
series: [{
|
||
|
itemStyle: {
|
||
|
normal: {
|
||
|
color: '#0084FF',
|
||
|
barBorderRadius: 12
|
||
|
},
|
||
|
},
|
||
|
// current data
|
||
|
type: 'bar',
|
||
|
barWidth: 15,
|
||
|
data: dValue,
|
||
|
label: {
|
||
|
show: true,
|
||
|
formatter: function (params) {
|
||
|
return ((params.value / dSum) * 100).toFixed(2) + ' %';
|
||
|
},
|
||
|
// position: 'right',
|
||
|
position:[180,0],
|
||
|
// offset: [20, 0],
|
||
|
color: '#333333',
|
||
|
fontSize: 12,
|
||
|
},
|
||
|
showBackground: true,
|
||
|
backgroundStyle: {
|
||
|
color: 'rgba(180, 180, 180, 0.2)',
|
||
|
borderRadius:[12,12,12,12]
|
||
|
},
|
||
|
markLine: {
|
||
|
symbol: 'none',
|
||
|
},
|
||
|
}, ]
|
||
|
|
||
|
}
|
||
|
}
|