Dashboard variables in Echarts plugin (Javascript)

Is it possible to use grafana dashbaord’s variables in Echarts plugin?

i use below code to get the value in dashboard, is there any better way to do it?
var startTime=document.getElementById(“_from”).title ;

with below script, it’s not working

and in chrome devtools, we can’t find the avriables:

Thanks a lot. We want to pass Grafana Dashboard dynamic variables to an HTTP API and then use the returned API data to provide to an Echarts panel. However, during this process, we found that we cannot access Grafana Dashboard variables in JavaScript.

It seems that the issue is not related to the volkovlabs-echarts-panel plugin. It looks like Grafana Dashboard variables cannot be fetched from the web page.

Hi I wonder if you already resolve this?
I have similar applications.

Here you go

1 Like