简体   繁体   English

amCharts - 节点间链接的工具提示

[英]amCharts - Tooltip on links between nodes

Is it possible to create tooltips for links between nodes on Force-directed tree?是否可以为力导向树上的节点之间的链接创建工具提示? Same kind as you rollover nodes.与翻转节点相同。 Using this example: https://www.amcharts.com/demos/force-directed-tree/使用此示例: https : //www.amcharts.com/demos/force-directed-tree/

Yes, you can use this是的,你可以使用这个

// You define the ForceDirectedSeries
const networkSeries = chart.series.push(
    new am4plugins_forceDirected.ForceDirectedSeries()
);
networkSeries.data = nodes;

const linkTemplate = networkSeries.links.template;

linkTemplate.interactionsEnabled = true; // this is so important
linkTemplate.tooltipText = 'tooltip text';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM