G2 icon indicating copy to clipboard operation
G2 copied to clipboard

5.x使用了SVGRenderer,外部容器设置scale缩放时,tooltip位置和大小显示异常

Open yyhdev opened this issue 1 year ago • 3 comments

问题描述

5.x使用了SVGRenderer,外部容器设置scale缩放时,tooltip位置和大小显示异常

export function newChart(
  container: string | HTMLElement,
  options?: RuntimeOptions
): Chart {
  const renderer = new SVGRenderer();
  const chart = new Chart({
    container,
    autoFit: true,
    theme: 'classicDark',
    renderer,
    ...options,
  });
  return chart;
}

image

重现链接

https://codesandbox.io/p/devbox/kl2rv9

重现步骤

1、进入页面 2、将鼠标移动到柱体上,查看错误

预期行为

tooltip展示大小和位置正常

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

yyhdev avatar Dec 19 '24 05:12 yyhdev

@interstellarmt 这个好像类似的 issue 已经解决过的,看看。

hustcc avatar Dec 19 '24 09:12 hustcc

@pearmini supportCSSTransform这个属性v5还支持吗,我没找到这个属性

interstellarmt avatar Dec 26 '24 03:12 interstellarmt

@interstellarmt

  • 这个 PR 应该加上了 https://github.com/antvis/G2/pull/5526
  • 可以看看这个 issue 的讨论:https://github.com/antvis/G2/issues/5472

pearmini avatar Jan 01 '25 00:01 pearmini