Grafana Events
Version
Dynamic Text Panel supports the event bus starting from version 4.0.0.
Grafana uses an event bus to publish application events to notify different parts of Grafana when the user interacts with it. Dynamic Text Panel can respond to these interactions by subscribing to one or more events.
Predefined Events
A full list of events is available in our Grafana Crash Course.
Subscribe to events
To avoid memory leaks, all events must be unsubscribed.
const subscription = eventBus.subscribe({ type: 'data-hover' }, () => {
console.log('React to Data Hover')
})
return () => {
subscription.unsubscribe();
console.log('Unsubscribed');
}
