Skip to content

Commit c4181ff

Browse files
committed
🙏 fixing tests
1 parent aea93b0 commit c4181ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plotly_resampler/figure_resampler/figure_resampler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ def _create_overview_figure(self) -> go.Figure:
438438
coarse_fig.add_vrect(xref="x domain", **vrect_props)
439439
return coarse_fig
440440

441+
col_idx_overview = 0
441442
for col_idx, row_idx in enumerate(self._overview_row_idxs):
442443
if row_idx is None: # skip the None value
443444
continue
@@ -453,11 +454,13 @@ def _create_overview_figure(self) -> go.Figure:
453454

454455
# add a shading to the overview
455456
coarse_fig.add_vrect(
456-
col=col_idx + 1,
457+
col=col_idx_overview + 1,
457458
xref=f"{subplot.trace_kwargs['xaxis']} domain",
458459
**vrect_props,
459460
)
460461

462+
col_idx_overview += 1 # only increase the index when not None
463+
461464
return coarse_fig
462465

463466
def show_dash(

0 commit comments

Comments
 (0)