John S
John S

Reputation: 73

MPAndroidChart, Is it possible to disable highlight on tap without disabling onValueSelected?

Is it possible to hide/disable highlight after tapping on an entry on the chart while keeping tapping functionality on? In order to enable tapping entries on the chart and displaying a custom dialog, I had to set:

isHighlightPerTapEnabled = true

This works fine but after tapping, a yellow highlight (cross-hairs) is visible on the chart. I am using linedatasets to draw on the graph and i've tried toggling:

setDrawHighlightIndicators = false

but this doesn't work.

I'm currently using: v3.1.0

Upvotes: 1

Views: 1061

Answers (1)

John S
John S

Reputation: 73

I found the solution, for each dataset you have on your chart:

        setDrawHorizontalHighlightIndicator(false)
        setDrawVerticalHighlightIndicator(false)

Upvotes: 4

Related Questions