antvis/G2







Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: 多轴图数据缺失的时候,tooltip title 显示异常 #6699
hustcc posted onGitHub
Describe the bug / 问题描述
tooltip显示相关问题,柱状图堆叠+折线图,部分时间X轴对应的Y轴没有值,这种情况显示的tooltip异常
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
});
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: 6, people: 3 },
{ time: '10:35', call: 8, waiting: null, people: null },
{ time: '10:40', call: 13, waiting: 3, people: 2 },
];
chart.data(data);
chart
.interval()
.encode('x', 'time')
.encode('y', 'waiting')
.encode('color', () => 'waiting')
chart
.interval()
.encode('x', 'time')
.encode('y', 'people')
.encode('color', () => 'people')
chart
.line()
.encode('x', 'time')
.encode('y', 'call')
.encode('color', () => 'call')
chart.render();
Reproduction link / 复现链接
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 / 其他