|
@@ -75,6 +75,18 @@ const setting = [
|
|
tabName: 'custom',
|
|
tabName: 'custom',
|
|
groupName: 'graph'
|
|
groupName: 'graph'
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ label: '指标小数位',
|
|
|
|
+
|
|
|
|
+ type: 'inputNumber',
|
|
|
|
+
|
|
|
|
+ field: 'statistic_fixed',
|
|
|
|
+
|
|
|
|
+ optionField: 'statisticFixed',
|
|
|
|
+ value: 0,
|
|
|
|
+ tabName: 'custom',
|
|
|
|
+ groupName: 'graph'
|
|
|
|
+ },
|
|
{
|
|
{
|
|
label: '指标字体类型',
|
|
label: '指标字体类型',
|
|
|
|
|
|
@@ -160,7 +172,9 @@ const data = [
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
|
|
-const optionHandler ='option.range.color = [option.color1, option.color2]'
|
|
+const optionHandler ='option.range.color = [option.color1, option.color2]\n' +
|
|
|
|
+ ' let fix = option.statisticFixed\n' +
|
|
|
|
+ ' option.statistic.title.formatter = ({ percent }) => `${(percent * 100).toFixed(fix)}%`'
|
|
|
|
|
|
const dataHandler = '// 取返回数据列表的第一项指标值\noption.percent = data[0][setting.filter(settingItem=>settingItem.field === \'percent\')[0].value]'
|
|
const dataHandler = '// 取返回数据列表的第一项指标值\noption.percent = data[0][setting.filter(settingItem=>settingItem.field === \'percent\')[0].value]'
|
|
|
|
|
|
@@ -175,6 +189,7 @@ const option = {
|
|
range: {
|
|
range: {
|
|
color: ['l(0) 0:#6b74e4 1:#4391f4','#d0d0d0']
|
|
color: ['l(0) 0:#6b74e4 1:#4391f4','#d0d0d0']
|
|
},
|
|
},
|
|
|
|
+ statisticFixed: 0,
|
|
startAngle: Math.PI,
|
|
startAngle: Math.PI,
|
|
endAngle: 2 * Math.PI,
|
|
endAngle: 2 * Math.PI,
|
|
indicator: null,
|
|
indicator: null,
|