How to implement onclick event for donut charts.


Topic: How to implement onclick event for donut charts.

boyd8811 pro asked 5 years ago

Do you have an example of how to add a click event for your charts, specfically the donut chart. I need to add functionality for what section of the chart you click on.


Adam Jakubowski staff pro premium priority answered 5 years ago

Hi,

We do't have such an example in our documentation, but try adding

$( "p" ).click(function() { //your code here });

to your code. Instead of p, enter the id or class of the element that must be clicked to show donut charts.

Best,

Adam


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.5
  • Device: Donut Chart
  • Browser: chrome
  • OS: win10
  • Provided sample code: No
  • Provided link: No