class_docstr: Data aggregation functionality for ``go.Figures``.
class_docstr_tok: ["Data","aggregation","functionality","for","``","go.Figures","``","."]
docstr: Register the [`construct_update_data_patch`][figure_resampler.figure_resampler_interface.AbstractFigureAggregator.construct_update_data_patch]
  method as callback function to the passed dash-app.
  
  Parameters
  ----------
  app: Union[dash.Dash, JupyterDash]
      The app in which the callback will be registered.
  graph_id:
      The id of the ``dcc.Graph``-component which withholds the to-be resampled
      Figure.
  coarse_graph_id: str, optional
      The id of the ``dcc.Graph``-component which withholds the coarse overview
      Figure, by default None.
docstr_tok: ["Register","the","[","`","construct_update_data_patch","`","]","[","figure_resampler.figure_resampler_interface.AbstractFigureAggregator.construct_update_data_patch","]","method","as","callback","function","to","the","passed","dash-app",".","Parameters","--","--","--","--","--","app",":","Union","[","dash.Dash",",","JupyterDash","]","The","app","in","which","the","callback","will","be","registered",".","graph_id",":","The","id","of","the","``","dcc.Graph","``","-component","which","withholds","the","to-be","resampled","Figure",".","coarse_graph_id",":","str",",","optional","The","id","of","the","``","dcc.Graph","``","-component","which","withholds","the","coarse","overview","Figure",",","by","default","None","."]
code: def register_update_graph_callback(
      self,
      app: dash.Dash,
      graph_id: str,
      coarse_graph_id: Optional[str] = None,
  ):
      """Register the [`construct_update_data_patch`][figure_resampler.figure_resampler_interface.AbstractFigureAggregator.construct_update_data_patch]
      method as callback function to the passed dash-app.
  
      Parameters
      ----------
      app: Union[dash.Dash, JupyterDash]
          The app in which the callback will be registered.
      graph_id:
          The id of the ``dcc.Graph``-component which withholds the to-be resampled
          Figure.
      coarse_graph_id: str, optional
          The id of the ``dcc.Graph``-component which withholds the coarse overview
          Figure, by default None.
  
      """
      # As we use the figure again as output, we need to set: allow_duplicate=True
  
      if coarse_graph_id is not None:
          # update pr graph range with overview selection
          app.clientside_callback(
              dash.ClientsideFunction(
                  namespace="clientside", function_name="coarse_to_main"
              ),
              dash.Output(graph_id, "id", allow_duplicate=True),
              dash.Input(coarse_graph_id, "selectedData"),
              dash.State(graph_id, "id"),
              dash.State(coarse_graph_id, "id"),
              prevent_initial_call=True,
          )
  
          # update selectbox with clientside callback
          app.clientside_callback(
              dash.ClientsideFunction(
                  namespace="clientside", function_name="main_to_coarse"
              ),
              dash.Output(coarse_graph_id, "id", allow_duplicate=True),
              dash.Input(graph_id, "relayoutData"),
              dash.State(coarse_graph_id, "id"),
              dash.State(graph_id, "id"),
              prevent_initial_call=True,
          )
  
      app.callback(
          dash.Output(graph_id, "figure", allow_duplicate=True),
          dash.Input(graph_id, "relayoutData"),
          prevent_initial_call=True,
      )(self.construct_update_data_patch)
  
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 8 for calling the FigureResampler obj's underlying member method code with example usage: obj.register_update_graph_callback(app, graph_id, coarse_graph_id) without return types