How to show more than one metrics options

I’m building a datasource based on simple json datasource. In the query editor, I need more than one options for input metrics, and the next metrics deppends on result of the metrics before. Like graphite metrics in image bellow:
metrics

With the value of my first metrics (source) in the second metric I wanna list the possibles destinations for that source. And in the third metric I wanna list the event-types from the source choiced to the destination choiced. Someone can help me to create that multiple metrics options and use the value of them ?

You will need to create a custom datasource for that, and implement a way to chain metric transforms so that you can nest functions like graphite

Yeah, is that what I trying to do. But I don’t understand how grafana see metrics.
If I pass this:
{
“range”: { “from”: “2015-12-22T03:06:13.851Z”, “to”: “2015-12-22T06:48:24.137Z” },
“interval”: “5s”,
“targets”: [
{ “refId”: “B”, “target”: “upper_75” },
{ “refId”: “A”, “target”: “upper_90” }
],
“format”: “json”,
“maxDataPoints”: 2495 //decided by the panel
}

to my query function, it will appear two targets in the same metric. How is the way which I need to structure my object to grafana see it as different metrics, not more options in the same metric field. I don’t know if I can explain well, my english is not so good.

You can look at both queries and return a combines series,