VChart
VChart copied to clipboard
[Feature] crosshiar should follow tooltip
What problem does this feature solve?
const spec = {
type: 'line',
data: {
values: [
{
time: '2:00',
value: 38
},
{
time: '4:00',
value: 56
},
{
time: '10:00',
value: 36
},
{
time: '14:00',
value: 24
},
{
time: '16:00',
value: 44
},
{
time: '22:00',
value: 22
}
]
},
xField: 'time',
yField: 'value',
line: {
style: {
curveType: 'monotone'
}
},
axes: [{
orient: 'bottom',
type: 'band',
domain: new Array(24).fill(0).map((entry, index) => {
return `${index}:00`
})
}]
};
const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();
// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
- tooltip现在只在有数据的点展示,但是crosshair 在没数据的点也会展示,希望crosshair 和tooltip同步
What does the proposed API look like?
{
followTooltip: true
}