antvis/G2

柱线组合图,坐标轴转置之后,tooltip缺失 #6329

Calmio-Y posted onGitHub

问题描述

import { Chart } from '@antv/g2';

const data = [ { time: '10:10', call: 4, waiting: 2, people: 2 }, { time: '10:15', call: 2, waiting: 6, people: 3 }, { time: '10:20', call: 13, waiting: 2, people: 5 }, { time: '10:25', call: 9, waiting: 9, people: 1 }, { time: '10:30', call: 5, waiting: 2, people: 3 }, { time: '10:35', call: 8, waiting: 2, people: 1 }, { time: '10:40', call: 13, waiting: 1, people: 2 }, ];

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

chart.data(data);

chart .interval() .encode('x', 'time') .encode('y', 'waiting') .axis('y', { title: 'Waiting', titleFill: '#5B8FF9' });

chart .line() .encode('x', 'time') .encode('y', 'people') .encode('shape', 'smooth') .style('stroke', '#fdae6b') .style('lineWidth', 2) .scale('y', { independent: true }) .axis('y', { position: 'right', grid: null, title: 'People', titleFill: '#fdae6b', }); chart.coordinate({ "transform": [{ "type": "transpose" }] }); chart.render(); /

重现链接

No response

重现步骤

No response

预期行为

期望tooltip正常显示

平台

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

屏幕截图或视频(可选)

image

补充说明(可选)

No response


这个 PR https://github.com/antvis/G2/pull/6286 已经解决了这个问题,升级到最新版本试一试。

posted by pearmini 10 months ago

6303有大佬看看吗

posted by Calmio-Y 10 months ago

Fund this Issue

$0.00
Funded

Pull requests