ae3e / ae3e-plotly-panel

Plotly panel for Grafana
Apache License 2.0
98 stars 22 forks source link

Using Grafana graph-hover to modify input data to graph #47

Open pbegg opened 2 years ago

pbegg commented 2 years ago

I am very new to Plotly and am not even sure if this is possible. I would like to be able to hover over a time series graph panel in grafana and on the same dashboard manipulate what is shown on the Plotly graph. Use Case: We are recording throttle and steering input in an influx2.0 data base. these are recorded as throttle position -100%-100% and steering position -100%-100%. We can view this on a time series graph which is fine - I would like to be able to hover over a certain time and it would then display the values on an x,y graph to represent the positions. The reason for this it will look more native to what the operator would see on there display while controlling the vessel. Like below:

image

Is this even possible? How would I access the graph-hover function?

import { SystemJS } from '@grafana/runtime' SystemJS.load('app/core/app_events').then((appEvents:any) => { appEvents.on('graph-hover', (e:any) => console.log(e)) })