dbuezas/lovelace-plotly-graph-card

jumping legend (browser issue or configured something wrong?)

commentsonly opened this issue · 2 comments

Describe the bug
I'm lost ... fiddling with rangeselector and margins but things start jumping either after some time, or one could force it is zooming into the chart

Screenshots
jumping_legend

Didn't add a complete YAML yet since it seems to make no differnce at all.
Only the layout section here.

layout:
  height: 850
  legend:
    'y': 1.25
  margin:
    t: 0
  title:
    x: 0
  xaxis:
    rangeselector:
      'y': 1.12
      buttons:
        - count: 1
          step: day
        - count: 2
          step: day
        - count: 7
          step: day

oh since the animated gif loops .... the legend starts at the lower position when one finalizes editing the YAML.
And if one does wait for a few seconds it jumps to the upper position. Once done so it remains there whatever one tries to do.
But it's a bit irritating if one wants to adjust the correct position for legend, title and so one since one has to leave the editor then wait a while and finally being presented what the modified YAML does show as it's result. Stepping back into editing the positions are then again lower but what they finally end up. Any idea?

Oh wow , I haven't observed that.
Maybe you can try changing the legend anchor. I'm not a fan myself on how the legend position is handled in plotlyjs tbh...
Maybe you can put it below instead, I think the algorithm is more stable that way, because y is not beyond 1 (not beyond 100%)

Closing since this is a limitation of plotly itself