Volkov Business Text — refresh when dashboard variable is changed

Using Volkov Business Text plugin, I use a dashboard variable in the javascript, and I want to redraw the panel when that variable is changed. I tried adding the below javascript code but it doesn’t do anything.

const subscription = context.grafana.eventBus.subscribe(
  { type: "variables-changed" },
  () => {
    console.log("Variables changed");
  }
);

I’m using Grafana Cloud with plugin version 5.4.0.

What do you expect it to do?

I expect it to print “Variables changed” to the browser JS console every time a user changes a dashboard variable. This code is just for demonstration; if I can get this working then I would replace the log statement with code to redraw the panel.

1 Like

I am also seeing the same issue in v12 container. I would write a bug for it