antvis/G2
Do you want to work on this issue?
You can request for a bounty in order to promote it!
stack 时间格式 resize后 tooltip hover部分轴不显示 #6453
shiyiya posted onGitHub
问题描述
stack 时间格式 resize后 tooltip hover部分轴不显示
<details>
<summary> 复现代码 </summary>
import { Chart } from '@antv/g2';
const data = [
{
type: 'less_one_hour',
timestamp: '2024/9/2',
value: 41,
wait_per_card: 9,
},
{
type: 'above_one_hour',
timestamp: '2024/9/2',
value: 2,
wait_per_card: 9,
},
{
type: 'above_four_hours',
timestamp: '2024/9/2',
value: 8,
wait_per_card: 9,
},
{
type: 'above_two_hours',
timestamp: '2024/9/2',
value: 2,
wait_per_card: 9,
},
{
type: 'less_one_hour',
timestamp: '2024/8/28',
value: 31,
wait_per_card: 11,
},
{
type: 'above_one_hour',
timestamp: '2024/8/28',
value: 3,
wait_per_card: 11,
},
{
type: 'above_four_hours',
timestamp: '2024/8/28',
value: 7,
wait_per_card: 11,
},
{
type: 'above_two_hours',
timestamp: '2024/8/28',
value: 1,
wait_per_card: 11,
},
// {
// type: 'less_one_hour',
// timestamp: '2024/8/30',
// value: 38,
// wait_per_card: 11,
// },
// {
// type: 'above_one_hour',
// timestamp: '2024/8/30',
// value: 1,
// wait_per_card: 11,
// },
// {
// type: 'above_four_hours',
// timestamp: '2024/8/30',
// value: 6,
// wait_per_card: 11,
// },
// {
// type: 'above_two_hours',
// timestamp: '2024/8/30',
// value: 1,
// wait_per_card: 11,
// },
{
type: 'less_one_hour',
timestamp: '2024/8/29',
value: 36,
wait_per_card: 8,
},
{
type: 'above_one_hour',
timestamp: '2024/8/29',
value: 0,
wait_per_card: 8,
},
{
type: 'above_four_hours',
timestamp: '2024/8/29',
value: 7,
wait_per_card: 8,
},
{
type: 'above_two_hours',
timestamp: '2024/8/29',
value: 5,
wait_per_card: 8,
},
{
type: 'less_one_hour',
timestamp: '2024/8/31',
value: 3,
wait_per_card: 0,
},
{
type: 'above_one_hour',
timestamp: '2024/8/31',
value: 0,
wait_per_card: 0,
},
{
type: 'above_four_hours',
timestamp: '2024/8/31',
value: 0,
wait_per_card: 0,
},
{
type: 'above_two_hours',
timestamp: '2024/8/31',
value: 0,
wait_per_card: 0,
},
{
type: 'less_one_hour',
timestamp: '2024/9/1',
value: 4,
wait_per_card: 0,
},
{
type: 'above_one_hour',
timestamp: '2024/9/1',
value: 0,
wait_per_card: 0,
},
{
type: 'above_four_hours',
timestamp: '2024/9/1',
value: 0,
wait_per_card: 0,
},
{
type: 'above_two_hours',
timestamp: '2024/9/1',
value: 0,
wait_per_card: 0,
},
]
const chart = new Chart({
container: 'container',
autoFit: true,
height: 500,
});
chart.data(data);
chart.scale('value', {
nice: true,
});
chart.tooltip({
shared: true,
});
chart
.interval()
.position('timestamp*value')
.color('type')
.adjust('stack');
chart.interaction('active-region');
chart.render();
</details>
重现链接
https://g2-v4.antv.vision/en/examples/column/stack#stacked
重现步骤
见录屏
预期行为
No response
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]