mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added click events in graph to core eventbus (#7511)
This commit is contained in:
committed by
Torkel Ödegaard
parent
e573006283
commit
8b25ba6a7c
@@ -253,6 +253,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
||||
backgroundColor: null,
|
||||
borderWidth: 0,
|
||||
hoverable: true,
|
||||
clickable: true,
|
||||
color: '#c8c8c8',
|
||||
margin: { left: 0, right: 0 },
|
||||
},
|
||||
|
||||
@@ -162,6 +162,10 @@ function ($, core) {
|
||||
appEvents.emit('graph-hover', {pos: pos, panel: panel});
|
||||
});
|
||||
|
||||
elem.bind("plotclick", function (event, pos, item) {
|
||||
appEvents.emit('graph-click', {pos: pos, panel: panel, item: item});
|
||||
});
|
||||
|
||||
this.clear = function(plot) {
|
||||
$tooltip.detach();
|
||||
plot.clearCrosshair();
|
||||
|
||||
Reference in New Issue
Block a user