I’m developing my own plugin and need to handle DataHoverEvent both ways: process events from other panels and emit one from my plugin itself.
However, I’m facing an issue with DataHoverEvent.
Receive events:
I’m using TimeSeries panels and I receive empty DataHoverEvents.
I get only relative y value. But I need hovered time, so at least a relative x value will do the job.
How come other fields are empty? Even though data is populated correctly.
Send events:
I’m trying to emit a DataHover event with different data via eventBus.publish() function but it is not reflected on other panels
Grafana version: v9.1.4
(I’ll try a newer version once I manage to build one )
There’s not much info regarding this stuff online so I would appreciate any help.
Thanks in advance!
Here is my PostgreSQL query from TimeSeries panel by the way
SELECT
$__time(time),
velocity,
'Actual velocity' as metric
FROM
velocity_actual
WHERE
$__timeFilter(time)
AND
vehicle_id = '$vehicle_id'
ORDER BY time ASC
SELECT
$__time(time) as time,
velocity as value,
'Actual velocity' as metric
FROM
velocity_actual
WHERE
$__timeFilter(time)
AND
vehicle_id = '$vehicle_id'
ORDER BY time ASC
Hi!
Thanks for your reply. Didn’t help unfortunately
$__time(time) as time for some reason results in an error db query error: pq: syntax error at or near "as"
This is the query that worked
SELECT
time as time,
velocity as value,
'Requested velocity' as metric
FROM
velocity_requested
WHERE
$__timeFilter(time)
AND vehicle_id = '$vehicle_id'
ORDER BY
time ASC