How to read a dashboard variable from apache echarts

hi, I don’t understand how can I access dashboard from echarts javascript. It is possible?
I just want to modify threshold on the graph depending of dashboad variable.
thanks.