class_docstr: Abstract interface for data aggregation functionality for plotly figures.
class_docstr_tok: ["Abstract","interface","for","data","aggregation","functionality","for","plotly","figures","."]
docstr: Construct a dict which maps the layout xaxis keys to the trace xaxis keys.
  
  Returns
  -------
  Dict[str, List[str]]
      A dict with the layout xaxis values as keys and the trace its corresponding
      xaxis anchor value.
docstr_tok: ["Construct","a","dict","which","maps","the","layout","xaxis","keys","to","the","trace","xaxis","keys",".","Returns","--","--","--","-","Dict","[","str",",","List","[","str","]","]","A","dict","with","the","layout","xaxis","values","as","keys","and","the","trace","its","corresponding","xaxis","anchor","value","."]
code: def _layout_xaxis_to_trace_xaxis_mapping(
      self,
  ) -> Dict[str, List[str]]:
      """Construct a dict which maps the layout xaxis keys to the trace xaxis keys.
  
      Returns
      -------
      Dict[str, List[str]]
          A dict with the layout xaxis values as keys and the trace its corresponding
          xaxis anchor value.
  
      """
      # edge case: an empty `go.Figure()` does not yet contain axes keys
      if self._grid_ref is None:
          return {"xaxis": ["x"]}
  
      mapping_dict = {}
      for sub_plot in itertools.chain.from_iterable(
          self._grid_ref
      ):  # flattten
          sub_plot = [] if sub_plot is None else sub_plot
          for (
              axes
          ) in (
              sub_plot
          ):  # NOTE: you can have multiple axes in a subplot
              layout_xaxes = axes.layout_keys[0]
              trace_xaxes = axes.trace_kwargs["xaxis"]
  
              # append the trace xaxis to the layout xaxis key its value list
              mapping_dict.setdefault(layout_xaxes, []).append(
                  trace_xaxes
              )
      return mapping_dict
  
imports: from __future__ import annotations
  import itertools
  import re
  from abc import ABC
  from collections import namedtuple
  from copy import copy
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  from uuid import uuid4
  import dash
  import numpy
  import pandas
  import plotly.graph_objects
  from pandas.io.json._normalize import nested_to_record
  from plotly.basedatatypes import BaseFigure, BaseTraceType
  from ..aggregation import AbstractAggregator, MedDiffGapHandler, MinMaxLTTB
  from ..aggregation.aggregation_interface import DataPointSelector
  from ..aggregation.gap_handler_interface import AbstractGapHandler
  from ..aggregation.plotly_aggregator_parser import PlotlyAggregatorParser
  from .utils import round_number_str, round_td_str
label_desc: Use image node_id 7 for calling the AbstractFigureAggregator obj's underlying member method code with example usage: obj._layout_xaxis_to_trace_xaxis_mapping() and returns: mapping_dict, dict