收藏
回答

微信小程序打包成app ec-canvas 图表datazoom缩放 和tooltip失效

var rainfallOption = {
  backgroundColor: "#fff",
  tooltip: {
    trigger: 'axis',
    axisPointer: { // 坐标轴指示器,坐标轴触发有效
      type'shadow' // 默认为直线,可选为:'line' | 'shadow'
    },
    confine: true
  },
  grid: {
    top: "5%",
    right: "12%",
    left: "12%",
    bottom: "12%",
  },
  xAxis: [{
    type"category",


    data: [],
  }],
  dataZoom : [{
    type'slider',
    xAxisIndex: 0,
    start: 0,
    end: 30// 初始显示30%的数据
    show: true,
    // zoomLock: true, // 禁止手动缩放
    height: 8,
    bottom: 5
  },
],
  yAxis: [{
    type"value",
  }],
  series: [{
    type"bar",
    data: [],
    barWidth: "15px",
  }, ]
};

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    2025-09-18
    有用
    回复
登录 后发表内容