user1060641
user1060641

Reputation: 179

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/

Upvotes: 1

Views: 158

Answers (1)

Alex Montoya
Alex Montoya

Reputation: 5099

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';

Upvotes: 2

Related Questions