How can i make stat panel value clickable

my grafana dashboard is on community.grafana.com

I am using simple json data source. I am embedding panels in my webpage using an iframe which is on localhost:5000. The panels that i am embedding are (pie, graph, stat) so now let us say that I have a stat panel like this on my webpage (localhost:5000/dashboard) in iframe.

Capture

When the user clicks on the stat value which is (28). I want the user to be navigated to some route for example localhost:5000/details and then show a drilldown on that page for the selected value.

right now i am thinking to attach an eventListener to the value which after inspecting is a span tag. but i cant access the iframe contents because grafana dashboard and website reside on different domains.

How can i do this using grafana ?

Seems like you might want a data link with some data link variables.