修改bug

This commit is contained in:
GGJ
2024-10-29 14:49:34 +08:00
parent 05a5531b74
commit 8f3f904e6d
5 changed files with 23 additions and 19 deletions

View File

@@ -65,6 +65,7 @@ const initChart = () => {
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0, borderWidth: 0,
confine:true,
...(props.options?.tooltip || null) ...(props.options?.tooltip || null)
}, },
toolbox: { toolbox: {

View File

@@ -13,6 +13,9 @@ export const yMethod = (arr: any) => {
} else { } else {
min = Math.floor(minValue / 100) * 100 min = Math.floor(minValue / 100) * 100
} }
} else if (maxValue == minValue && maxValue < 10 && minValue > 0) {
max = Math.ceil(maxValue / 10) * 10
min = Math.floor(minValue / 10) * 10
} else if (maxValue == minValue && maxValue != 0 && minValue != 0) { } else if (maxValue == minValue && maxValue != 0 && minValue != 0) {
max = Math.ceil(maxValue / 10 + 1) * 10 max = Math.ceil(maxValue / 10 + 1) * 10
min = Math.floor(minValue / 10 - 1) * 10 min = Math.floor(minValue / 10 - 1) * 10

View File

@@ -309,21 +309,21 @@ const init = () => {
// right: '4%' // right: '4%'
// }, // },
tooltip: { tooltip: {
axisPointer: { // axisPointer: {
type: 'cross', // type: 'cross',
label: { // label: {
color: '#fff', // color: '#fff',
fontSize: 16 // fontSize: 16
} // }
}, // },
textStyle: { // textStyle: {
color: '#fff', // color: '#fff',
fontStyle: 'normal', // fontStyle: 'normal',
opacity: 0.35, // opacity: 0.35,
fontSize: 14 // fontSize: 14
}, // },
backgroundColor: 'rgba(0,0,0,0.35)', // backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0 // borderWidth: 0
}, },
xAxis: { xAxis: {
name: '时间', name: '时间',

View File

@@ -241,7 +241,7 @@ const init = async () => {
itemGap: 15, itemGap: 15,
type: 'scroll', // 开启滚动分页 type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列 // orient: 'vertical', // 垂直排列
top: 5, top: 10,
bottom: 30, bottom: 30,
width: 400, width: 400,
height: 50 height: 50
@@ -353,7 +353,7 @@ const init = async () => {
ABCList.forEach((kk: any) => { ABCList.forEach((kk: any) => {
let seriesList: any = [] let seriesList: any = []
kk.forEach((cc: any) => { kk.forEach((cc: any) => {
if (cc.statisticalData) { if (cc.statisticalData !== null) {
yMethodList.push(cc.statisticalData?.toFixed(2) - 0) yMethodList.push(cc.statisticalData?.toFixed(2) - 0)
} }

View File

@@ -475,7 +475,7 @@ const init = (flag: boolean) => {
itemGap: 15, itemGap: 15,
type: 'scroll', // 开启滚动分页 type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列 // orient: 'vertical', // 垂直排列
top: 5, top: 10,
bottom: 30, bottom: 30,
width: 400, width: 400,
height: 50 height: 50
@@ -559,7 +559,7 @@ const init = (flag: boolean) => {
ABCList.forEach((kk: any) => { ABCList.forEach((kk: any) => {
let seriesList: any = [] let seriesList: any = []
kk.forEach((cc: any) => { kk.forEach((cc: any) => {
if (cc.statisticalData) { if (cc.statisticalData !== null) {
yMethodList.push(cc.statisticalData?.toFixed(2) - 0) yMethodList.push(cc.statisticalData?.toFixed(2) - 0)
} }