PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.64k stars 9.02k forks source link

Barchart - fully disable highlighting? #3849

Closed gfdarcy closed 6 years ago

gfdarcy commented 6 years ago

I can't seem to fully disable highlighting. I want a zoomable bar graph, but it's highlighting the bars when I drag a zoomed in set of data.

MGaetan89 commented 6 years ago

What have you tried?

gfdarcy commented 6 years ago

Sorry for the delay, I was away for Easter!

This is the code I'm using;

    // enable zooming
    mChart.setAutoScaleMinMaxEnabled(false);
    mChart.setScaleEnabled(false);
    mChart.setContextClickable(false);
    mChart.setClickable(false);
    mChart.setFocusable(false);
    mChart.setDoubleTapToZoomEnabled(true);
    mChart.setPinchZoom(false);
    mChart.setTouchEnabled(true);
    mChart.setDragEnabled(true);
    mChart.setScaleYEnabled(false);
    mChart.setScaleXEnabled(true);
    mChart.setHighlightPerTapEnabled(false);
    mChart.setHighlightFullBarEnabled(false);
gibels-and-bits commented 6 years ago

I ended up doing this at the dataSet level...

        dataSet.highLightAlpha = 0
gfdarcy commented 6 years ago

gibels, your post lead me to this; dataSet.setHighlightEnabled(false);

I'm still testing to see if it works, but so far so good.

MGaetan89 commented 6 years ago

@gfdarcy Did @gibels-and-bits solution works for you? If so, can you close this issue?

gibels-and-bits commented 6 years ago

Yes I would say this is working as expected

On Sun, Apr 29, 2018, 12:15 PM Gaëtan Muller notifications@github.com wrote:

@gfdarcy https://github.com/gfdarcy Did @gibels-and-bits https://github.com/gibels-and-bits solution works for you? If so, can you close this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PhilJay/MPAndroidChart/issues/3849#issuecomment-385266337, or mute the thread https://github.com/notifications/unsubscribe-auth/AGWLAEQXv3cSK2dRRKprimpOEXE8S2Sxks5ttfUqgaJpZM4SgdK- .