We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
创建多个view时,第一个view上才能看到tooltip,第二个view上没有tooltip 有tooltip:
没有tooltip:
No response
··· import { Chart } from '@antv/g2';
const chart = new Chart({ container: 'container', width: 928, height: 320, paddingLeft: 90, paddingBottom: 60, });
const data = [ [ { x: 1, y: 2}, { x: 2, y: 6}, { x: 3, y: 4}, { x: 4, y: 9} ], [ { x: 1, y: 3}, { x: 2, y: 6}, { x: 3, y: 7}, { x: 4, y: 9} ] ]; const spaceFlex = chart.spaceFlex();
for (let i = 0; i < data.length; i++) { const view = spaceFlex.view(); view.data(data[i]) .axis({ x: { title: 'X', line: true, lineLineWidth: 1, grid: false }, y: { title: i === 0 ? 'Y' : false, line: i === 0, lineLineWidth: 1, label: i === 0, tick: i === 0, grid: true, gridLineWidth: 2 } }) .line() .encode('x', 'x') .encode('y', 'y') .tooltip(); } chart.render(); ···
第二个view上也有tooltip
The text was updated successfully, but these errors were encountered:
相同的问题:#6130
Sorry, something went wrong.
No branches or pull requests
问题描述
创建多个view时,第一个view上才能看到tooltip,第二个view上没有tooltip
有tooltip:
没有tooltip:
重现链接
No response
重现步骤
···
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
width: 928,
height: 320,
paddingLeft: 90,
paddingBottom: 60,
});
const data = [
[
{ x: 1, y: 2},
{ x: 2, y: 6},
{ x: 3, y: 4},
{ x: 4, y: 9}
],
[
{ x: 1, y: 3},
{ x: 2, y: 6},
{ x: 3, y: 7},
{ x: 4, y: 9}
]
];
const spaceFlex = chart.spaceFlex();
for (let i = 0; i < data.length; i++) {
const view = spaceFlex.view();
view.data(data[i])
.axis({
x: {
title: 'X',
line: true,
lineLineWidth: 1,
grid: false
},
y: {
title: i === 0 ? 'Y' : false,
line: i === 0,
lineLineWidth: 1,
label: i === 0,
tick: i === 0,
grid: true,
gridLineWidth: 2
}
})
.line()
.encode('x', 'x')
.encode('y', 'y')
.tooltip();
}
chart.render();
···
预期行为
第二个view上也有tooltip
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: