VChart
VChart copied to clipboard
[Feature] label和主图元同等地位,触发mark
What problem does this feature solve?
hover到label后,无法展示mark的tooltip
What does the proposed API look like?
没有API
https://github.com/VisActor/VChart/pull/3687 @xiaoluoHe 这个之前的修复貌似有问题,没生效
const spec = {
type: 'scatter',
data: [
{
id: 'id0',
values: [
{ x: '1', y: 22 },
{ x: '2', y: 43 },
{ x: '3', y: 33 },
{ x: '4', y: 22 },
{ x: '5', y: 10 },
{ x: '6', y: 30 },
{ x: '7', y: 46 },
{ x: '8', y: 21 },
{ x: '9', y: 33 },
{ x: '10', y: 43 },
{ x: '11', y: 42 },
{ x: '12', y: 30 },
{ x: '13', y: 9 },
{ x: '14', y: 46 }
]
}
],
tooltip: {
dimension: {
visible: false
}
},
xField: 'x',
yField: 'y',
label: {
visible: true,
showRelatedMarkTooltip: true,
style: {
showRelatedMarkTooltip: true,
}
}
};
const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();
#3687 @xiaoluoHe 这个之前的修复貌似有问题,没生效
需要开启 label 交互
label: {
visible: true,
interactive: true,
showRelatedMarkTooltip: true,
}