antvis/G2





Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: 分组柱图,如果某个值为null,在tooltips为shared情况下,没有该值的提示 #6754
sanye-huang posted onGitHub
Describe the bug / 问题描述
测试代码
import { Chart } from "@antv/g2";
const chart = new Chart({ container: "container" });
chart.options({
type: "interval",
autoFit: true,
data: [
{ name: "London", 月份: "Jan.", 月均降雨量: 18.9 },
{ name: "London", 月份: "Feb.", 月均降雨量: 28.8 },
{ name: "London", 月份: "Mar.", 月均降雨量: 39.3 },
{ name: "London", 月份: "Apr.", 月均降雨量: null },
{ name: "London", 月份: "May", 月均降雨量: 47 },
{ name: "London", 月份: "Jun.", 月均降雨量: 20.3 },
{ name: "London", 月份: "Jul.", 月均降雨量: 24 },
{ name: "London", 月份: "Aug.", 月均降雨量: 35.6 },
{ name: "Berlin", 月份: "Jan.", 月均降雨量: 12.4 },
{ name: "Berlin", 月份: "Feb.", 月均降雨量: 23.2 },
{ name: "Berlin", 月份: "Mar.", 月均降雨量: 34.5 },
{ name: "Berlin", 月份: "Apr.", 月均降雨量: 99.7 },
{ name: "Berlin", 月份: "May", 月均降雨量: 52.6 },
{ name: "Berlin", 月份: "Jun.", 月均降雨量: 35.5 },
{ name: "Berlin", 月份: "Jul.", 月均降雨量: 37.4 },
{ name: "Berlin", 月份: "Aug.", 月均降雨量: null },
],
encode: { x: "月份", y: "月均降雨量", color: "name" },
transform: [{ type: "dodgeX" }],
interaction: {
tooltip: {
shared: true
}, elementHighlight: { background: true }
},
});
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 / 其他