I have created a scatter chart in javafx.It consists of five series of data.I added data from an Arraylist.I need to show a tooltip on every datapoint.To add tooltip it says that we need to create a node for every datapoint.How can we do that?
I tried creating node while adding data but i didnot succeed. I also tried accessing data from scatter chart and assigning it to a new series.even that didnot work.Can someone please help me retrieve details or datapoints from a scatter chart and create a node to each datapoint. Thanks in Advance
From the API doc of
XYChart.Data.nodeProperty
: (bold marking by me)It should probably be best to let the chart set its default
Node
s and registerTooltip
s later. Like this:Looks like this:
Nice article about scatter charts:
After adding data to bar chart
add the following snippet to the code