antvis/G2

The issue has been closed
BrushFilter 交互和 Tooltip 交互 crosshairs 消失不见 #4577
pearmini posted onGitHub
export async function indicesLineBrushSeries(): Promise<G2Spec> {
const data = await csv('data/indices.csv', autoType);
return {
type: 'view',
children: [
{
type: 'line',
width: 800,
paddingLeft: 50,
data,
axis: {
y: { labelAutoRotate: false },
},
transform: [{ type: 'normalizeY', basis: 'first', groupBy: 'color' }],
legend: false,
encode: {
x: 'Date',
y: 'Close',
color: 'Symbol',
key: 'Symbol',
title: (d) => new Date(d.Date).toUTCString(),
},
},
],
interactions: [{ type: 'tooltip' }, { type: 'brushXFilter' }],
};
}