Panel won't refresh if it updates a variable that is used in another panel

@igorkujacic12 If I understand correctly, your data source uses variables in the code directly, not from the Query Editor.

If it’s correct, then adding input fields, which have variables as values replaced in the code, should solve the issue. The data Source will be refreshed, and trigger panel render every time any of the mentioned variables changed.

Alternatively, you can look at the event bus event for variables updates: How to subscribe to Grafana application events