antvis/G2

[Bug]: 升级5.3.0版本后,散点图十字辅助线失效了 #6762

linjc posted onGitHub

Describe the bug / 问题描述

以下使用5.2.12版本,散点图添加以下代码能正常显示十字辅助线

chart.line()
    .interaction('tooltip', {
        crosshairs: true,
    })

Image

升级到5.3.0版本后,无法显示十字辅助线,鼠标移动时控制台打印报错信息

Image

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

能提供一下demo吗

posted by interstellarmt 14 days ago

📝 To help us better understand and address your issue, please provide more information, or use the standard format, otherwise we will not process this issue.

Reference document:


📝 为了帮助我们更好地理解和解决你的问题,请提供更多信息,或者使用规范的格式,否则我们不会处理这个 issue。

参考文档:

posted by github-actions[bot] 14 days ago

能提供一下demo吗

@interstellarmt 以下代码能复现

const chart = new Chart({
      container: 'container',
      autoFit: true,
    });

    chart
      .data({
        type: 'fetch',
        value:
          ' https://gw.alipayobjects.com/os/bmw-prod/474e51c8-b47b-4bb6-b3ed-87813a960df2.csv',
      })
      .encode('x', 'mpg')
      .encode('y', 'hp')
      .encode('color', 'mpg')

    chart
      .point()
      .encode('shape', 'point')
      .encode('size', 6)
      .tooltip(false);

    chart.line()
      .interaction('tooltip', {
        crosshairs: true,
    })
    chart.render();
posted by linjc 14 days ago

Fund this Issue

$0.00
Funded

Pull requests