NearestPoint nearest = this.nearestSingleton;
HashSet<RenderedPoint> nearby = getDatasetRenderer(i).getClickable(plotX, plotY);
if ((null != nearby) && (nearby.size()>0)) {
Iterator<RenderedPoint> clique = nearby.iterator();
while(clique.hasNext()) {
RenderedPoint pt = clique.next();
// double domainX = pt.getDomain();
// double rangeY = pt.getRange0();
double sx = pt.getPlotX();
double sy = pt.getPlotY();
double distance = DistanceFormula.XY.dist(plotX, plotY, sx, sy);
if (distance < minNearestDist) {
nearestPt = pt.getDomainIndex();
nearestSer = pt.getDatasetIndex();
minNearestDist = distance;
nearestDim = pt.getDimension();
}
}
}
}