code: def create_slices(tbl: SqlaTable) -> list[Slice]:
      slice_kwargs = {
          "datasource_id": tbl.id,
          "datasource_type": DatasourceType.TABLE,
          "owners": [],
      }
  
      defaults = {
          "limit": "25",
          "time_range": "100 years ago : now",
          "granularity_sqla": "ds",
          "row_limit": "50000",
          "viz_type": "echarts_timeseries_bar",
      }
  
      slices = [
          # ---------------------
          # TIER 1
          # ---------------------
          Slice(
              **slice_kwargs,
              slice_name="Big Number",
              viz_type="big_number_total",
              params=get_slice_json(
                  defaults,
                  viz_type="big_number_total",
                  metric="sum__num",
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Big Number with Trendline",
              viz_type="big_number",
              params=get_slice_json(
                  defaults,
                  viz_type="big_number",
                  metric="sum__num",
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Table",
              viz_type="table",
              params=get_slice_json(
                  defaults,
                  viz_type="table",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Pivot Table",
              viz_type="pivot_table_v2",
              params=get_slice_json(
                  defaults,
                  viz_type="pivot_table_v2",
                  metrics=["sum__num"],
                  groupbyColumns=["gender"],
                  groupbyRows=["state"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Line Chart",
              viz_type="echarts_timeseries_line",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries_line",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Area Chart",
              viz_type="echarts_area",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_area",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Bar Chart V2",
              viz_type="echarts_timeseries_bar",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries_bar",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Scatter Chart",
              viz_type="echarts_timeseries_scatter",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries_scatter",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Pie Chart",
              viz_type="pie",
              params=get_slice_json(
                  defaults,
                  viz_type="pie",
                  metric="sum__num",
                  groupby=["gender"],
                  adhoc_filters=[],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Bar Chart",
              viz_type="dist_bar",
              params=get_slice_json(
                  defaults,
                  viz_type="dist_bar",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          # ---------------------
          # TIER 2
          # ---------------------
          Slice(
              **slice_kwargs,
              slice_name="Box Plot Chart",
              viz_type="box_plot",
              params=get_slice_json(
                  defaults,
                  viz_type="box_plot",
                  metrics=["sum__num"],
                  groupby=["gender"],
                  columns=["name"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Bubble Chart",
              viz_type="bubble",
              params=get_slice_json(
                  defaults,
                  viz_type="bubble",
                  size="count",
                  series="state",
                  entity="gender",
                  x={
                      "expressionType": "SIMPLE",
                      "column": {
                          "column_name": "num_boys",
                      },
                      "aggregate": "SUM",
                      "label": "SUM(num_boys)",
                      "optionName": "metric_353e7rjj84m_cirsi2o2s1",
                  },
                  y={
                      "expressionType": "SIMPLE",
                      "column": {
                          "column_name": "num_girls",
                      },
                      "aggregate": "SUM",
                      "label": "SUM(num_girls)",
                      "optionName": "metric_n8rvsr2ysmr_cb3eybtoe5f",
                  },
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Calendar Heatmap",
              viz_type="cal_heatmap",
              params=get_slice_json(
                  defaults,
                  viz_type="cal_heatmap",
                  metrics=["sum__num"],
                  time_range="2008-01-01 : 2008-02-01",
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Chord Chart",
              viz_type="chord",
              params=get_slice_json(
                  defaults,
                  viz_type="chord",
                  metric="sum__num",
                  groupby="gender",
                  columns="state",
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Percent Change Chart",
              viz_type="compare",
              params=get_slice_json(
                  defaults,
                  viz_type="compare",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Generic Chart",
              viz_type="echarts_timeseries",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Smooth Line Chart",
              viz_type="echarts_timeseries_smooth",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries_smooth",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Time-Series Step Line Chart",
              viz_type="echarts_timeseries_step",
              params=get_slice_json(
                  defaults,
                  viz_type="echarts_timeseries_step",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Funnel Chart",
              viz_type="funnel",
              params=get_slice_json(
                  defaults,
                  viz_type="funnel",
                  metric="sum__num",
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Gauge Chart",
              viz_type="gauge_chart",
              params=get_slice_json(
                  defaults,
                  viz_type="gauge_chart",
                  metric="sum__num",
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Heatmap Chart",
              viz_type="heatmap",
              params=get_slice_json(
                  defaults,
                  viz_type="funnel",
                  metric="sum__num",
                  all_columns_x="gender",
                  all_columns_y="state",
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Line Chart",
              viz_type="line",
              params=get_slice_json(
                  defaults,
                  viz_type="line",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Mixed Chart",
              viz_type="mixed_timeseries",
              params=get_slice_json(
                  defaults,
                  viz_type="mixed_timeseries",
                  metrics=["sum__num"],
                  groupby=["gender"],
                  metrics_b=["sum__num"],
                  groupby_b=["state"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Partition Chart",
              viz_type="partition",
              params=get_slice_json(
                  defaults,
                  viz_type="partition",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Radar Chart",
              viz_type="radar",
              params=get_slice_json(
                  defaults,
                  viz_type="radar",
                  metrics=[
                      "sum__num",
                      "count",
                      {
                          "expressionType": "SIMPLE",
                          "column": {
                              "column_name": "num_boys",
                          },
                          "aggregate": "SUM",
                          "label": "SUM(num_boys)",
                          "optionName": "metric_353e7rjj84m_cirsi2o2s1",
                      },
                  ],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Nightingale Chart",
              viz_type="rose",
              params=get_slice_json(
                  defaults,
                  viz_type="rose",
                  metrics=["sum__num"],
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Sankey Chart",
              viz_type="sankey",
              params=get_slice_json(
                  defaults,
                  viz_type="sankey",
                  metric="sum__num",
                  groupby=["gender", "state"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Sunburst Chart",
              viz_type="sunburst",
              params=get_slice_json(
                  defaults,
                  viz_type="sunburst",
                  metric="sum__num",
                  groupby=["gender", "state"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Treemap V2 Chart",
              viz_type="treemap_v2",
              params=get_slice_json(
                  defaults,
                  viz_type="treemap_v2",
                  metric="sum__num",
                  groupby=["gender"],
              ),
          ),
          Slice(
              **slice_kwargs,
              slice_name="Word Cloud Chart",
              viz_type="word_cloud",
              params=get_slice_json(
                  defaults,
                  viz_type="word_cloud",
                  metric="sum__num",
                  series="state",
              ),
          ),
      ]
  
      for slc in slices:
          merge_slice(slc)
  
      return slices
  
file_path: superset/superset/examples/supported_charts_dashboard.py
imports: import json
  import textwrap
  from sqlalchemy import inspect
  from superset import db
  from superset.connectors.sqla.models import SqlaTable
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.utils.core import DatasourceType
  from ..utils.database import get_example_database
  from .helpers import get_slice_json, get_table_connector_registry, merge_slice, update_slice_ids
label_desc: Use image node_id 1 for calling a global function with example usage: create_slices(tbl) and returns: slices