grafana-diagram icon indicating copy to clipboard operation
grafana-diagram copied to clipboard

Issues with metric values disrupting other formatting

Open cbryant42 opened this issue 3 years ago • 1 comments

I have a potential bug I've noticed.. When creating the diagram before adding the metric values, all of my formatting seems correct and reactive to changes, however, when I try to add in my metric values to the nodes the formatting gets messed up and reacts in unexpected ways (namely with <br> or <br />, and node resizing). An example might make this more clear:

Without metric value in nodes: image

With metric value in nodes: image

I'm attempting to modify the legend format to match the node IDs in order to match specific value -> node, as each metric returns multiple values. The legend naming appears to be correct for what I want. Perhaps there is a better/different way to be placing these values in to the diagram?

Here is my diagram definition (abbreviated to avoid company specifics):

graph LR
    subgraph texttexttexttext 
        route1(text)
        route2(text)
        e0(texttext <br>texttext)
        f0(texttext <br>texttext)
    end    
        


route1 -- Primary --- e0

route2  -- Secondary ---    f0

And here are my metrics: image

Summary: I want to add metric values into diagram nodes, but when I do all formatting gets messed up and unresponsive. Nodes don't resize to text, <br> or <br/> are no longer respected, etc.

Let me know if there's more information I can give to diagnose the problem. Thanks in advance for any help!

cbryant42 avatar Dec 06 '21 20:12 cbryant42

Sorry you're having trouble with it.

Which version are you using? Have you tried using any of the style overrides?

jdbranham avatar Apr 08 '22 20:04 jdbranham