}
// draw domain crosshair if required...
int datasetIndex = crosshairState.getDatasetIndex();
ValueAxis xAxis = this.getDomainAxisForDataset(datasetIndex);
RectangleEdge xAxisEdge = getDomainAxisEdge(getDomainAxisIndex(xAxis));
if (!this.domainCrosshairLockedOnData && anchor != null) {
double xx;
if (orient == PlotOrientation.VERTICAL) {
xx = xAxis.java2DToValue(anchor.getX(), dataArea, xAxisEdge);
}
else {
xx = xAxis.java2DToValue(anchor.getY(), dataArea, xAxisEdge);
}
crosshairState.setCrosshairX(xx);
}
setDomainCrosshairValue(crosshairState.getCrosshairX(), false);
if (isDomainCrosshairVisible()) {
double x = getDomainCrosshairValue();
Paint paint = getDomainCrosshairPaint();
Stroke stroke = getDomainCrosshairStroke();
drawDomainCrosshair(g2, dataArea, orient, x, xAxis, stroke, paint);
}
// draw range crosshair if required...
ValueAxis yAxis = getRangeAxisForDataset(datasetIndex);
RectangleEdge yAxisEdge = getRangeAxisEdge(getRangeAxisIndex(yAxis));
if (!this.rangeCrosshairLockedOnData && anchor != null) {
double yy;
if (orient == PlotOrientation.VERTICAL) {
yy = yAxis.java2DToValue(anchor.getY(), dataArea, yAxisEdge);
} else {