class_docstr: Data aggregation functionality for ``go.Figures``.
class_docstr_tok: ["Data","aggregation","functionality","for","``","go.Figures","``","."]
code: def _create_overview_figure(self) -> go.Figure:
      # create a new coarse fig
      reduced_fig = self._remove_other_axes_for_coarse()
  
      # Resample the coarse figure using 3x the default aggregation size to ensure
      # that it contains sufficient details
      coarse_fig_hf = FigureResampler(
          reduced_fig,
          default_n_shown_samples=3 * self._global_n_shown_samples,
      )
  
      # NOTE: this way we can alter props without altering the original hf data
      # NOTE: this also copies the default aggregation functionality to the coarse figure
      coarse_fig_hf._hf_data = {
          uid: trc.copy() for uid, trc in self._hf_data.items()
      }
      for trace in coarse_fig_hf.hf_data:
          trace["max_n_samples"] *= 3
  
      coarse_fig_dict = coarse_fig_hf._get_current_graph()
      # add the 3x max_n_samples coarse figure data to the coarse_fig_dict
      coarse_fig_hf._check_update_figure_dict(coarse_fig_dict)
      del coarse_fig_hf
  
      coarse_fig = go.Figure(layout=coarse_fig_dict["layout"])
      coarse_fig._grid_ref = reduced_fig._grid_ref
      coarse_fig._data_validator.set_uid = False
      coarse_fig.add_traces(coarse_fig_dict["data"])
      # remove any update menus for the coarse figure
      coarse_fig.layout.pop("updatemenus", None)
      # remove the `rangeselector` options for all 'axis' keys in the layout of the
      # coarse figure
      for k, v in coarse_fig.layout._props.items():
          if "axis" in k:
              v.pop("rangeselector", None)
  
      # height of the overview scales with the height of the dynamic view
      coarse_fig.update_layout(
          **self._overview_layout_kwargs,
          hovermode=False,
          clickmode="event+select",
          dragmode="select",
      )
      # Hide the grid
      hide_kwrgs = dict(
          showgrid=False,
          showticklabels=False,
          zeroline=False,
          title_text=None,
          mirror=True,
          ticks="",
          showline=False,
          linecolor="black",
      )
      coarse_fig.update_yaxes(**hide_kwrgs)
      coarse_fig.update_xaxes(**hide_kwrgs)
  
      vrect_props = dict(
          **dict(line_width=0, x0=0, x1=1),
          **dict(fillcolor="lightblue", opacity=0.25, layer="above"),
      )
  
      if self._grid_ref is None:  # case: go.Figure (no subplots)
          # set the fixed range to True
          coarse_fig["layout"]["xaxis"]["fixedrange"] = True
          coarse_fig["layout"]["yaxis"]["fixedrange"] = True
  
          # add a shading to the overview
          coarse_fig.add_vrect(xref="x domain", **vrect_props)
          return coarse_fig
  
      col_idx_overview = 0
      for col_idx, row_idx in enumerate(self._overview_row_idxs):
          if row_idx is None:  # skip the None value
              continue
  
          # we will only use the first grid-ref (as we will otherwise have multiple
          # overlapping selection boxes)
          for subplot in self._grid_ref[row_idx][col_idx][:1]:
              xaxis_key, yaxis_key = subplot.layout_keys
  
              # set the fixed range to True
              coarse_fig["layout"][xaxis_key]["fixedrange"] = True
              coarse_fig["layout"][yaxis_key]["fixedrange"] = True
  
              # add a shading to the overview
              coarse_fig.add_vrect(
                  col=col_idx_overview + 1,
                  xref=f"{subplot.trace_kwargs['xaxis']} domain",
                  **vrect_props,
              )
  
          col_idx_overview += 1  # only increase the index when not None
  
      return coarse_fig
  
imports: from __future__ import annotations
  import os
  import warnings
  from pathlib import Path
  from typing import List, Optional, Tuple
  import dash
  import plotly.graph_objects
  from plotly.basedatatypes import BaseFigure
  from ..aggregation import AbstractAggregator, AbstractGapHandler, MedDiffGapHandler, MinMaxLTTB
  from .figure_resampler_interface import AbstractFigureAggregator
  from .utils import is_figure, is_fr
label_desc: Use image node_id 5 for calling the FigureResampler obj's underlying member method code with example usage: obj._create_overview_figure() and returns: coarse_fig, coarse_fig