afreechart/src/main/java/org/afree/chart/plot/CategoryCrosshairState.java
/**
     * Updates only the crosshair row and column keys (this is for the case
     * where the range crosshair does NOT lock onto the nearest data value).
     * 
     * @param rowKey
     *            the row key.
     * @param columnKey
     *            the column key.
     * @param datasetIndex
     *            the dataset axis index.
     * @param transX
     *            the translated x-value.
     * @param orientation
     *            the plot orientation.
     */
Updates only the crosshair row and column keys (this is for the case
where the range crosshair does NOT lock onto the nearest data value).

@param rowKey
the row key.
@param columnKey
the column key.
@param datasetIndex
the dataset axis index.
@param transX
the translated x-value.
@param orientation
the plot orientation.
Updates only the crosshair row and column keys ( this is for the case where the range crosshair does NOT lock onto the nearest data value ) . @param rowKey the row key . @param columnKey the column key . @param datasetIndex the dataset axis index . @param transX the translated x - value . @param orientation the plot orientation .
public void updateCrosshairX(Comparable rowKey, Comparable columnKey,
            int datasetIndex, double transX, PlotOrientation orientation) {
        PointF anchor = getAnchor();
        if (anchor != null) {
            double anchorX = anchor.x;
            if (orientation == PlotOrientation.HORIZONTAL) {
                anchorX = anchor.y;
            }
            double d = Math.abs(transX - anchorX);
            if (d < getCrosshairDistance()) {
                this.rowKey = rowKey;
                this.columnKey = columnKey;
                setDatasetIndex(datasetIndex);
                setCrosshairDistance(d);
            }
        }
    }
public void updateCrosshairX ( Comparable rowKey , Comparable columnKey , int datasetIndex , double transX , PlotOrientation orientation ) { PointF anchor = getAnchor ( ) ; if ( anchor != null ) { double anchorX = anchor . x ; if ( orientation == PlotOrientation . HORIZONTAL ) { anchorX = anchor . y ; } double d = Math . abs ( transX - anchorX ) ; if ( d < getCrosshairDistance ( ) ) { this . rowKey = rowKey ; this . columnKey = columnKey ; setDatasetIndex ( datasetIndex ) ; setCrosshairDistance ( d ) ; } } }
Updates only the crosshair row and column keys (this is for the case
 where the range crosshair does NOT lock onto the nearest data value).
Updates only the crosshair row and column keys ( this is for the case where the range crosshair does NOT lock onto the nearest data value ) .