josephsoo commited on
Commit
edb99d6
·
1 Parent(s): 6bf3ac7

Stabilize plot hover labels

Browse files
Files changed (2) hide show
  1. app.py +11 -2
  2. assets/styles.css +7 -1
app.py CHANGED
@@ -653,7 +653,16 @@ def figure_layout(
653
  font=dict(family="Arial, Helvetica, sans-serif", size=13, color=TEXT_COLOR),
654
  title=dict(font=dict(size=16, color=TEXT_COLOR), x=0.01, xanchor="left"),
655
  legend=legend,
656
- hoverlabel=dict(font=dict(family="Arial, Helvetica, sans-serif", size=12)),
 
 
 
 
 
 
 
 
 
657
  )
658
  fig.update_xaxes(
659
  showgrid=True,
@@ -2062,7 +2071,7 @@ app.layout = html.Div(
2062
  title="Manuscript link will be added on release.",
2063
  ),
2064
  html.Span(
2065
- ["Submit a model", html.Small("planned")],
2066
  className="nav-placeholder",
2067
  title="A model-submission workflow is planned.",
2068
  ),
 
653
  font=dict(family="Arial, Helvetica, sans-serif", size=13, color=TEXT_COLOR),
654
  title=dict(font=dict(size=16, color=TEXT_COLOR), x=0.01, xanchor="left"),
655
  legend=legend,
656
+ hoverlabel=dict(
657
+ align="left",
658
+ bgcolor="#FFFFFF",
659
+ bordercolor="#607080",
660
+ font=dict(
661
+ family="Arial, Helvetica, sans-serif",
662
+ size=12,
663
+ color=TEXT_COLOR,
664
+ ),
665
+ ),
666
  )
667
  fig.update_xaxes(
668
  showgrid=True,
 
2071
  title="Manuscript link will be added on release.",
2072
  ),
2073
  html.Span(
2074
+ ["Submit a model", html.Small("coming soon")],
2075
  className="nav-placeholder",
2076
  title="A model-submission workflow is planned.",
2077
  ),
assets/styles.css CHANGED
@@ -477,12 +477,18 @@ h2 {
477
 
478
  .graph-box {
479
  min-width: 0;
480
- overflow: hidden;
481
  border: 1px solid #e3e9ed;
482
  border-radius: 9px;
483
  background: #ffffff;
484
  }
485
 
 
 
 
 
 
 
486
  .graph-box + .graph-box,
487
  .chart-grid + .graph-box,
488
  .graph-box + .chart-grid {
 
477
 
478
  .graph-box {
479
  min-width: 0;
480
+ overflow: visible;
481
  border: 1px solid #e3e9ed;
482
  border-radius: 9px;
483
  background: #ffffff;
484
  }
485
 
486
+ .js-plotly-plot .plotly .hoverlayer,
487
+ .js-plotly-plot .plotly .hoverlayer * {
488
+ pointer-events: none !important;
489
+ transition: none !important;
490
+ }
491
+
492
  .graph-box + .graph-box,
493
  .chart-grid + .graph-box,
494
  .graph-box + .chart-grid {