How to show the count of rows grouped under one heat map layer in geo maps?

I have this heat map


But I want to show the count once I click on the heatmap, foe example the heatmap in Africa has 10 rows grouped inside it and I want to show them is that possible?

yes it is possible. what is your datasource?

@yosiasz mysql db

please post some sample data. your issue is really not grafana, it is a query issue but I think we can help you

select count(1) Counter, 
lat, 
lon
from starwars
group by lat, lon

then use Counter to be displayed on hearmal

@yosiasz the thing is the datapoints might not be the exact same, they might be close to each other but not at the exact same spot.

you have to find a way to get one common cluster value based on distance between them so you can “polygonize” them so to speak

look at the haversine formula.

I dont think there is a feature to have grafana itself count points in the heatmap

@yosiasz Okay, thanks I look into that.