Commit 8b25ba6a by Dennis Wiemer Committed by Torkel Ödegaard

Added click events in graph to core eventbus (#7511)

parent e5730062
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment