Thank you for the message. My version is Grafana v10.1.5.
Sorry I did not make it clear enough - I set two variables in Grafana to enable my selection of different data sources, both of them are from SQL but in different tables.
I attempted data mapping as below, it worked when there is only one data source but failed when another data source was added. Any suggestion please?
let data = context.panel.data;
data.series.map((s) => {
if (selectedQuery === ‘0_year’) {
I tried to use context.grafana.replaceVariables at the beginning:
let selectedQuery = context.grafana.replaceVariables(“$selector”);
but it does not work. I am using BUsiness Charts plugin.
Hi, maybe I can help, I’m creating variables in the panel and adding them like this:
const hostName = context.grafana.replaceVariables(“$variable”);
With this, every time I add the hostName attribute somewhere, it returns the value of the variable