图标统计调整

This commit is contained in:
2023-02-11 13:36:19 +08:00
parent 4f492c259a
commit 5a43cf3f0b
7 changed files with 156 additions and 154 deletions

View File

@@ -27,6 +27,95 @@ const formatNumber = n => {
return n[1] ? n : `0${n}`
}
const getPieOption = pieData => {
let option = {
backgroundColor: "#3C4043",
series: [{
label: {
normal: {
fontSize: 14
}
},
type: 'pie',
center: ['50%', '50%'],
radius: ['0%', '70%'],
data: pieData
}]
}
return option
}
const getDayLineOption = lineData => {
let option = {
legend: {
data: ['支出', '收入', '转账','还款'],
top: 20,
left: 'center',
backgroundColor: 'white',
z: 100
},
grid: {
containLabel: true
},
tooltip: {
show: true,
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
show: false
},
yAxis: {
x: 'center',
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
series: lineData
}
return option
}
const getMonthLineOption = lineData => {
let option = {
legend: {
data: ['支出', '收入', '转账','还款'],
top: 20,
left: 'center',
backgroundColor: 'white',
z: 100
},
grid: {
containLabel: true
},
tooltip: {
show: true,
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
show: false
},
yAxis: {
x: 'center',
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
// show: false
},
series: lineData
};
return option
}
const getToken = () => {
const map = ['E','q','u','i','n','W','A','b','C','d']
const errKey = ['f','g','h','j','k','l']
@@ -56,5 +145,8 @@ module.exports = {
formatTime,
formatDate,
formatDateMonth,
getToken
getToken,
getPieOption,
getDayLineOption,
getMonthLineOption
}