I am using MPAndroidChart library.
I have used Horizontal bar charts in my dashboard.
I want to navigate to another activity by clicking particular bar of that chart.
How can i do this??
I am using MPAndroidChart library.
I have used Horizontal bar charts in my dashboard.
I want to navigate to another activity by clicking particular bar of that chart.
How can i do this??
That's actually pretty easy, all you have to do is use the
OnChartValueSelectedListener
and start your newActivity
from the callback methods.You can find an example of how that works here.
Basically, implement the listener in your class that holds the chart:
Set the listener to the chart:
Start your new activity in the callback: