Skip to content

Charts hopping up/down because legends layout changes on hover #482

@0ff1ane

Description

@0ff1ane

Hi,

Sometimes the charts in the lower rows hop up and down because the legends of the upper charts change their layout/height

Attaching video recording

live_dashboard_before.mov

The issue seems to be in the uPlot css.
I added some custom css to fix it

/* Override uplot styles */
.u-series {
  th {
    /* Avoid legend title wrapping when data is shown for that row, changes the heights */
    text-wrap: nowrap;
  }
}

.u-inline {
  /* Avoid block for legends, leads to chart card size updates and hopping */
  display: flex;
  flex-direction: column;
}

Video recording with css fix

live_dashboard_after.mov

Is this the right way to do this?
I hope I'm not missing some obvious option that I could have used.

Thanks for the great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions