update
1.银川大屏新增急救数据模块
This commit is contained in:
@@ -463,6 +463,73 @@ export function barOption(xData, ydata, theme) {
|
||||
};
|
||||
}
|
||||
|
||||
export function getOptions(data: any[] = [], colors: any[] = [], totalTimes: number = 0) {
|
||||
return {
|
||||
title: [
|
||||
{
|
||||
text: totalTimes + '人',
|
||||
left: 'center',
|
||||
top: '35%',
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontStyle: 'normal',
|
||||
fontWeight: '400', // 字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
|
||||
fontFamily: 'Source Han Sans CN',
|
||||
fontSize: 20,
|
||||
height: '22%',
|
||||
},
|
||||
},
|
||||
{
|
||||
subtext: '急救总次数',
|
||||
subtextStyle: {
|
||||
color: '#ffffff',
|
||||
fontStyle: 'normal',
|
||||
fontWeight: '500',
|
||||
fontFamily: 'Source Han Sans CN',
|
||||
fontSize: 24,
|
||||
},
|
||||
left: 'center',
|
||||
top: '48%',
|
||||
},
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
},
|
||||
label: {
|
||||
formatter: '{b} {c}',
|
||||
// fontSize: 18
|
||||
},
|
||||
legend: {
|
||||
top: '0%',
|
||||
left: 'center',
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
},
|
||||
},
|
||||
colors: colors,
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['60%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
padAngle: 1,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
},
|
||||
center: ['50%', '55%'],
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: 40,
|
||||
// fontWeight: 'bold',
|
||||
// },
|
||||
// },
|
||||
data: data,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 值是否不为零
|
||||
* @param list 数组
|
||||
|
||||
Reference in New Issue
Block a user