Delete selected datapoint on chart from dataset

Is there a way to tell which data point on a chart is selected in order to delete it from the charts dataset? I would like to be able to exclude a point on the graph. It would be ideal have the point deleted when right clicked.

I have looked at the property selectedData on the chart, but the four items it returns are not unique.

selectedData is what should be used for this. Why are they not unique?

The dataset being graphed is from lab tests. One column is the sample label and the other is the measured value for a perticular test. some times a test will be run multiple times on the same sample and will have the same label.

Is there a way I can add a unique key to the charts dataset without it graphing the unique key?

But the selectedData property has four components, including the x and y values. Shouldn’t that combination be unique? If not, isn’t it irrelevant? If the points are completely the same, just delete one of them.

ok that seems to work just fine. Now when the datapoint is selected and removed the yellow selection dot stays even though the point is not graphed any more. What property do I need to set in order to get the yellow selection to disappear?

Also can you make one dataset on the chart selectable and another dataset not selectable?

You can call table.clearSelection() to remove the yellow selection. You cannot make just one dataset selectable, they all are by default.