问题描述
<ResponsiveScatterPlot
data={rawData.filter((item) => !hiddenIds.includes(item.id))}
margin={{ top: 40,right: 140,bottom: 70,left: 90 }}
xScale={{ type: 'linear',min: -1,max: 1 }}
yScale={{ type: 'linear',max: 1 }}
blendMode="multiply"
axisTop={null}
axisRight={null}
axisBottom={{
orient: 'bottom',tickSize: 5,tickPadding: 5,tickRotation: 0,}}
axisLeft={{
orient: 'left',}}
tooltip={(node) => {
return (
<div style={theme.tooltip.container}>
<strong>
{`Label: ${node.node.data.serieId}`}
<br />
</strong>
{`Id: ${node.node.data.caption}`}
</div>
)
}}
现在,我想添加一个切换按钮来一次显示/隐藏所有工具提示,以便更容易/更好地阅读可视化,但我不知道如何处理它? 似乎没有允许这样做的设置,至少从我发现的情况来看。 我不知道如何遍历散点图中的所有节点来手动添加一个 html 对象。
所以,我们的想法是有一个可以显示/隐藏所有工具提示的切换按钮。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)