Can I set/update query editor by using my panel plugin?

I want to accomplish: user change some custom options in my Panel Options, then click one button to generate a new query(according to panel options) in query editor(via api?)
Is it possible to do this?
And one more question, can I add field override in my panel plugin after generate a new query?

1 Like

Same problem for me did anyone know the answer ?

One of the options is using dashboard variables. The panel can update variables with locationService. Data Source will retrieve updated data based on the provided variables.

Thank you for the answer but did you have an example, I’m not sure I fully understand what you explain.

Grafana documentation explains how to support and update variables in plugins: Add support for variables in plugins | Grafana documentation

I try this but it didn’t work for me did you have another solution ?

It depends on your panel and the data source you are using. If both are custom, you can use the data source directly from the panel.

I need more information on what you are using and looking for.

I have two needs :

  • Take data from datasource.ts and set my select in my auery editor with this value

  • Take the value selected in this select in the query editor and change when the value change my request in the datasource.ts

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.