1***@qq.com
1***@qq.com
  • 发布:2024-10-29 09:55
  • 更新:2024-10-29 09:55
  • 阅读:435

【报Bug】echarts手指在图表上下滑动会导致图表消失,再次点击出现

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windows11

HBuilderX类型: 正式

HBuilderX版本号: 4.24

第三方开发者工具版本号: 1.06.2405020

基础库版本号: 3.5.8

项目创建方式: HBuilderX

示例代码:
<template> <view> <uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="uni-ec-canvas" force-use-old-canvas="true" canvas-id="uni-ec-canvas" ec="ec1" ></uni-ec-canvas>
</view>
</template>
<script>
import uniEcCanvas from '@/components/uni-ec-canvas/uni-ec-canvas.vue'
export default {
data() {
return {
ec1:{
option:{}
},
}
},
components: {uniEcCanvas},
onLoad() {
this.getdata()
},
methods: {
getdata() {
this.ec1.option = {
title:{
text:'能耗排名',
left: 'center',
top: '0%'
},
tooltip: {
show: true,
backgroundColor: 'rgba(0, 0, 0, 0.7)',
textStyle: {
color: '#fff',
fontSize: 12,
},
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
formatter: {b} {a0}:{c0}
},
toolbox: {
show: false,
},
legend: {
show: false,
},
grid: {
left: '10%',
right: '15%',
bottom: '10%',
top: '25%',
containLabel: true
},
yAxis: {
type: 'category',
data: ['区域一','区域二','区域三','区域四','区域五'],
axisLine: {
lineStyle: {
color: '#333'
}
},
axisLabel: {
interval: 3,
rotate: 40,
showMaxLabel: true,
textStyle: {
fontFamily: 'Microsoft YaHei',
fontWeight: 600,
fontSize: 12
}
},
},
xAxis: {
name: '',
nameTextStyle: {
color: "#333"
},
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: '#333'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#b8b8b8'
}
},
axisLabel: {
textStyle: {
fontWeight: 600
}
}
},
series: [
{
name: '实测单耗',
type: 'bar',
data: [12,23,34,45,56],
barWidth: '30%',
itemStyle: {
normal: {
color: '#4166c0'
},
},
}
],
}
},
}
}
}
</script>
<style></style>

操作步骤:

上下滑动页面

预期结果:

图表正常渲染

实际结果:

图表出现消失问题

bug描述:

页面可滑动时,在echarts图表上滑动页面会导致图表渲染消失。

2024-10-29 09:55 负责人:无 分享
已邀请:

要回复问题请先登录注册