Mpandroidchart: Disabling the crosshair pointer on line chart

Created on 6 Oct 2015  路  2Comments  路  Source: PhilJay/MPAndroidChart

Hi Phil

Hi is there a property that will disable the crosshair that appears when you click on the line? It's a nice feature but my data has many lines that i dont want to get confused.

Thanks

Most helpful comment

In class LineDataSet, you can find the following methods:

    /**
     * Enables / disables the horizontal highlight-indicator. If disabled, the indicator is not drawn.
     * @param enabled
     */
    public void setDrawHorizontalHighlightIndicator(boolean enabled) {
        this.mDrawHorizontalHighlightIndicator = enabled;
    }

    /**
     * Enables / disables the vertical highlight-indicator. If disabled, the indicator is not drawn.
     * @param enabled
     */
    public void setDrawVerticalHighlightIndicator(boolean enabled) {
        this.mDrawVerticalHighlightIndicator = enabled;
    }

    /**
     * Enables / disables both vertical and horizontal highlight-indicators.
     * @param enabled
     */
    public void setDrawHighlightIndicators(boolean enabled) {
        setDrawVerticalHighlightIndicator(enabled);
        setDrawHorizontalHighlightIndicator(enabled);
    }

All 2 comments

In class LineDataSet, you can find the following methods:

    /**
     * Enables / disables the horizontal highlight-indicator. If disabled, the indicator is not drawn.
     * @param enabled
     */
    public void setDrawHorizontalHighlightIndicator(boolean enabled) {
        this.mDrawHorizontalHighlightIndicator = enabled;
    }

    /**
     * Enables / disables the vertical highlight-indicator. If disabled, the indicator is not drawn.
     * @param enabled
     */
    public void setDrawVerticalHighlightIndicator(boolean enabled) {
        this.mDrawVerticalHighlightIndicator = enabled;
    }

    /**
     * Enables / disables both vertical and horizontal highlight-indicators.
     * @param enabled
     */
    public void setDrawHighlightIndicators(boolean enabled) {
        setDrawVerticalHighlightIndicator(enabled);
        setDrawHorizontalHighlightIndicator(enabled);
    }

Is it possible to show the corresponding y-axis value on HighlightIndicator ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsengvn picture tsengvn  路  3Comments

OnlyInAmerica picture OnlyInAmerica  路  3Comments

SutharRohit picture SutharRohit  路  3Comments

galex picture galex  路  3Comments

Giammaofwar picture Giammaofwar  路  3Comments