grafana-discrete-panel icon indicating copy to clipboard operation
grafana-discrete-panel copied to clipboard

Legend information interpolated in the rows

Open kazeborja opened this issue 6 years ago • 4 comments

Hi,

First of all, nice plugin. Now, the use case I have.

I need to show a lot of different rows in the panel, but having the legend only at the end makes it very hard to get useful information out of it.

I have been playing a little bit with the code to get something I could use and I was wondering if you think it might be useful in general, and in case it is, do you accept contributions to the plugin?

In this case I added a new option to show the legend interpolated, which created an extra row per data point and adds the metric name (alias) + the legend information for the specific point. As you can see in the image is not overwriting the legend functionality at all, rather adding some extra one.

image

Thanks.

kazeborja avatar Jul 28 '17 15:07 kazeborja

So this is writing the legend using canvas rather than the dom :(

I messed with this, but did not find a style that looked good. Writing the legend with canvas rather than the DOM gets kinda ugly.

Maybe we could make the canvas bigger, then move the legend into place using absolute positioning? https://stackoverflow.com/questions/16586734/html-over-the-canvas

ryantxu avatar Sep 20 '17 21:09 ryantxu

Sorry, missed the track of the issue.

It's indeed doing that, I don't totally get how you expect it to look like using absolute positioning. In any case I don't see much difference than how it's writing the status in the canvas itself (true it's not really plot related :P).

Thanks for the answer.

kazeborja avatar Oct 10 '17 09:10 kazeborja

Hello,

I like this feature. Can your code/changes be found somewhere? Can't see any related MR.

Thanks in advance.

dvo-rak avatar Mar 03 '21 15:03 dvo-rak

Hi dvoraan8, I didn't push any MR because I wanted to make sure if the request was making sense I have the changes in one of our internal repositories but can share them with you if you would like to try them :)

kazeborja avatar Mar 04 '21 08:03 kazeborja