Graph panel with combo box

Hi

I would like to add combo to a specific graph. not to dashborad but to the graph panel itself. The motivation is to have an “instance selection” as following:
https://play.grafana.org/d/000000063/prometheus-templating?orgId=1
But in graph itself.
Is there such an option? If I would like to develop such panel where do I begin?

Thanks!