Skip to main content

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

EventDescription
absolute-time
annotation-event
annotation-query-finished
annotation-query-started
copy-panelCalled to copy a panel JSON into local storage.
dashboard-loaded
dashboard-saved
data-hoverHovering over Legend and data point when shared crosshair enabled.
data-hover-clear
data-select
datasource-updated-successfully
panel-edit-finished
panel-edit-started
refreshCalled when a dashboard is refreshed.
render
shift-time
theme-changedCalled when the theme settings change.
time-range-updatedCalled when time range is updated.
variables-changed
variables-changed-in-url
variables-time-range-process-done
zoom-out