修改bug

This commit is contained in:
zhujiyan
2024-11-01 11:21:12 +08:00
parent 9217ae0ae1
commit f12fafd0f2
8 changed files with 145 additions and 101 deletions

View File

@@ -34,6 +34,7 @@ const resizeHandler = () => {
})
}
const initChart = () => {
console.log(props.options,"888888888");
if (!props.isInterVal && !props.pieInterVal) {
chart?.dispose()
}
@@ -65,7 +66,7 @@ const initChart = () => {
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0,
confine:true,
confine: true,
...(props.options?.tooltip || null)
},
toolbox: {
@@ -73,10 +74,9 @@ const initChart = () => {
top: 20,
feature: {
saveAsImage: {
title: '保存图片',
title: '保存图片'
},
...(props.options?.toolbox?.featureProps || null),
...(props.options?.toolbox?.featureProps || null)
},
// },
...(props.options?.toolbox || null)
@@ -123,9 +123,10 @@ const initChart = () => {
series: props.options?.series,
...props.options?.options
}
// console.log(options.series,"获取x轴");
handlerBar(options)
// 处理柱状图
chart.setOption(options,true)
chart.setOption(options, true)
setTimeout(() => {
chart.resize()
@@ -214,9 +215,10 @@ const handlerXAxis = () => {
// textStyle: {
fontFamily: 'dinproRegular',
color: '#000',
fontSize: '12'
fontSize: '12',
// }
}
},
// boundaryGap: false,
}
// props.options?.xAxis 是数组还是对象
if (Array.isArray(props.options?.xAxis)) {
@@ -234,9 +236,6 @@ const handlerXAxis = () => {
}
}
let throttle: ReturnType<typeof setTimeout>
// 动态计算table高度
const resizeObserver = new ResizeObserver(entries => {