code: def build_saved_header(config):
      chart_type = config["chart_type"]
      final_data = [
          ("Data ID", config["data_id"]),
          ("Query", config.get("query")),
          ("Chart Type", chart_type),
      ]
      if config.get("agg") not in [None, "raw"]:
          final_data.append(("Aggregation", config["agg"]))
  
      if chart_type == "maps":
          group_by = config["map_group"]
          map_type = config.get("map_type")
          if map_type == "scattergeo":
              map_props = [
                  "map_type",
                  "lat",
                  "lon",
                  "map_val",
                  "scope",
                  "proj",
              ]
          elif map_type == "mapbox":
              map_props = [
                  "map_type",
                  "lat",
                  "lon",
                  "map_val",
                  "mapbox_style",
              ]
          else:
              map_props = ["map_type", "loc_mode", "loc", "map_val"]
              if config.get("loc_mode") == "geojson-id":
                  map_props += ["geojson", "featureidkey"]
          for prop in map_props:
              final_data.append((prop, config.get(prop)))
      elif chart_type == "candlestick":
          group_by = config["cs_group"]
          for prop in [
              "cs_x",
              "cs_open",
              "cs_close",
              "cs_high",
              "cs_low",
          ]:
              final_data.append((prop.split("_")[-1], config.get(prop)))
      elif chart_type == "treemap":
          group_by = config["treemap_group"]
          for prop in ["treemap_value", "treemap_label"]:
              final_data.append((prop.split("_")[-1], config.get(prop)))
      elif chart_type == "funnel":
          group_by = config["funnel_group"]
          for prop in ["funnel_value", "funnel_label"]:
              final_data.append((prop.split("_")[-1], config.get(prop)))
      elif chart_type == "clustergram":
          group_by = config["clustergram_group"]
          for prop in ["clustergram_value", "clustergram_label"]:
              final_data.append((prop.split("_")[-1], config.get(prop)))
      else:
          group_by = config.get("group")
          final_data.append(("X-Axis", config["x"]))
          y = make_list(config["y"])
          final_data.append(
              ("Y-Axes" if len(y) > 1 else "Y-Axis", ",".join(y))
          )
          if chart_type in ZAXIS_CHARTS:
              final_data.append(("z", config.get("z")))
          if chart_type == "scatter" and config["trendline"]:
              final_data.append(("Trendline", "\u2714"))
  
      if group_by:
          group_by_cols = make_list(group_by)
          final_data.append(("Group By", ", ".join(group_by_cols)))
          group_type = config.get("group_type")
          final_data.append(("Group Type", group_type))
          if group_type == "bins":
              final_data.append(("Bin Type", config["bin_type"]))
              final_data.append(("Bins", config["bin_val"]))
          else:
              final_data.append(
                  (
                      "Selected Groups",
                      ", ".join(
                          [
                              "({})".format(
                                  ",".join(
                                      [v[c] for c in group_by_cols]
                                  )
                              )
                              for v in make_list(
                                  config.get("group_val")
                              )
                          ]
                      ),
                  )
              )
  
      if config["cpg"]:
          final_data.append(("Chart Per Group", "\u2714"))
      if config["cpy"]:
          final_data.append(("Chart Per Y", "\u2714"))
      if chart_type in ANIMATION_CHARTS and config["animate"]:
          final_data.append(("Animate", "\u2714"))
      if chart_type in ANIMATE_BY_CHARTS and config["animate_by"]:
          final_data.append(
              ("Animate By", ", ".join(make_list(config["animate_by"])))
          )
  
      return build_hoverable(
          html.I(className="ico-help-outline"),
          [
              html.B("Chart Configuration"),
              html.Ul(
                  [
                      html.Li(
                          [
                              html.B(text(prop)),
                              html.Span(": {}".format(value)),
                          ],
                          className="mb-0",
                      )
                      for prop, value in final_data
                      if value is not None
                  ],
                  className="mb-0",
              ),
          ],
          hover_class="saved-chart-config",
          top="unset",
      )
  
file_path: dtale/dtale/dash_application/saved_charts.py
imports: import dash_bootstrap_components
  from dash.dependencies import Input, Output, State
  from dtale.charts.utils import ANIMATION_CHARTS, ANIMATE_BY_CHARTS, ZAXIS_CHARTS
  from dtale.dash_application import dcc, html
  from dtale.dash_application.charts import build_chart, valid_chart
  from dtale.dash_application.exceptions import DtalePreventUpdate
  from dtale.dash_application.layout.utils import build_hoverable
  from dtale.utils import dict_merge, is_app_root_defined, flatten_lists, make_list
  from dtale.translations import text
label_desc: Use image node_id 2 for calling a global function with example usage: build_saved_header(config) and returns: build_hoverable