VolkovLabs / business-text

The Business Text panel plugin allows you to construct a text visualization template from the values of a dataset returned by a data source query.
https://volkovlabs.io
Apache License 2.0
83 stars 13 forks source link

Adding shared crosshair events #175

Closed janicaud closed 1 year ago

janicaud commented 1 year ago

Hello there, we really love using your plugin.

Do you think it could be possible to inject the event bus to retrieve events coming from the shared crosshair feature, for us to reinject in the dynamic text panel ?

Use case could be this one : we have a SVG object we want to rotate using the cursor position from an another panel ? image

Best regards,

Nicolas

mikhail-vl commented 1 year ago

@janicaud It should not be an issue to subscribe to eventBus events. I will take a look at it

janicaud commented 1 year ago

Should be this object injected in the dashboard : https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/events/EventBus.ts

With this sample : https://stackoverflow.com/questions/69627511/how-to-implement-shared-crosshair-in-a-custom-plugin-grafana

mikhail-vl commented 1 year ago

@janicaud Yes, that's correct, but implementation is different for Functional components.

I will get back to you.