Grafana Events (EventBus)
Grafana uses an event bus to publish application events to notify different parts of Grafana when the user acts.
const subscription = eventBus.subscribe({ type: "data-hover" }, () => {
console.log("Data hovered.");
});
return () => {
subscription.unsubscribe();
};
Predefined Events
Event | Description |
---|---|
absolute-time | |
annotation-event | |
annotation-query-finished | |
annotation-query-started | |
copy-panel | Called to copy a panel JSON into local storage. |
dashboard-loaded | |
dashboard-saved | |
data-hover | Hovering over Legend and data point when shared crosshair enabled. |
data-hover-clear | |
data-select | |
datasource-updated-successfully | |
panel-edit-finished | |
panel-edit-started | |
refresh | Called when a dashboard is refreshed. |
render | |
shift-time | |
theme-changed | Called when the theme settings change. |
time-range-updated | Called when time range is updated. |
variables-changed | |
variables-changed-in-url | |
variables-time-range-process-done | |
zoom-out |