How can I get a callback for clicking on an axis label?

I’d like to get a callback and be able to do something when someone clicks on a label. For example, if someone clicks on the xlabel or ylabel.

Does anyone know how I could do that using javascript?

In case anyone was wondering, I just completely removed the labels and recreated them manually in a way that I could add callbacks as needed.