G2Plot
G2Plot copied to clipboard
🐛 [BUG]堆叠柱状图tooltip位置出现偏移的问题
🐛 Bug description [Please make everyone to understand it]
Please provide a link by forking these links G2Plot or GitHub repo, a minimal reproduction. 图表容器设置css transform scale缩放后,鼠标悬停tooltip位置会出现偏移。
- Required Link to minimal reproduction:
📷 Step to reproduce
https://g2plot.antv.vision/zh/examples/column/stacked#basic 任意一个示例,打开Chrome Devtool,在container上加一行代码:
transform:scale(0.8)
🏞 Expected result
无论容器怎么加scale,鼠标悬停位置即是tooltips显示位置,比如echarts这个柱图
https://www.makeapie.cn/echarts_content/xSJJXiE1Wx.html
🚑 Any additional [like screenshots]
- G2Plot Version:latest
- Platform:macOS Chrome Dev 105.0.5148.2(正式版本)dev (x86_64)
🐛 Bug description [Please make everyone to understand it]
Please provide a link by forking these links G2Plot or GitHub repo, a minimal reproduction. 图表容器设置css transform scale缩放后,鼠标悬停tooltip位置会出现偏移。
- Required Link to minimal reproduction:
📷 Step to reproduce
https://g2plot.antv.vision/zh/examples/column/stacked#basic 任意一个示例,打开Chrome Devtool,在container上加一行代码:
transform:scale(0.8)
🏞 Expected result
无论容器怎么加scale,鼠标悬停位置即是tooltips显示位置,比如echarts这个柱图 https://www.makeapie.cn/echarts_content/xSJJXiE1Wx.html
🚑 Any additional [like screenshots]
- G2Plot Version:latest
- Platform:macOS Chrome Dev 105.0.5148.2(正式版本)dev (x86_64)
我也遇到了这个问题,请问您解决了吗 @cooper1x
请移步至 https://github.com/antvis/G2Plot/issues/1160
import { Column } from '@antv/g2plot';
const stackedColumnPlot = new Column('container', {
data,
+ supportCSSTransform: true,
isStack: true,
xField: 'year',
yField: 'value',
// ...
});