code: def test_line(unittest):
      import dtale.views as views
  
      df = pd.DataFrame(dict(a=[1, 2, 3], b=[4, 5, 6], c=[7, 8, 9]))
      with app.test_client() as c:
          df, _ = views.format_data(df)
          build_data_inst({c.port: df})
          inputs = {
              "chart_type": "line",
              "x": "a",
              "y": ["b"],
              "z": None,
              "group": ["c"],
              "group_val": [dict(c=7)],
              "agg": None,
              "window": None,
              "rolling_comp": None,
          }
          chart_inputs = {
              "cpg": True,
              "barmode": "group",
              "barsort": "b",
          }
          extended_aggregation = [
              dict(col="b", agg="sum"),
              dict(col="c", agg="mean"),
          ]
          params = build_chart_params(
              c.port,
              inputs,
              chart_inputs,
              extended_aggregation=extended_aggregation,
          )
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          resp_data = response.get_json()["response"]
          assert len(resp_data["chart-content"]["children"]) == 1
          chart = resp_data["chart-content"]["children"][0]["props"][
              "children"
          ][1]
          unittest.assertEqual(
              chart["props"]["figure"]["layout"],
              {
                  "legend": {"orientation": "h", "y": -0.3},
                  "title": {
                      "text": "(c: 7) - Sum of b, Mean of c by a"
                  },
                  "xaxis": {
                      "tickformat": "0:g",
                      "title": {"text": "a"},
                  },
                  "yaxis": {
                      "tickformat": "0:g",
                      "title": {"text": "Sum of b, Mean of c"},
                  },
              },
          )
          unittest.assertEqual(
              list(
                  map(
                      lambda d: d["name"],
                      chart["props"]["figure"]["data"],
                  )
              ),
              ["Sum of b", "Mean of c"],
          )
  
          inputs["group"] = None
          inputs["group_val"] = None
          chart_inputs["cpg"] = False
          params = build_chart_params(c.port, inputs, chart_inputs)
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          resp_data = response.get_json()["response"]
          assert resp_data["chart-content"]["children"]["type"] == "Div"
  
          chart_inputs["animate"] = True
          params = build_chart_params(c.port, inputs, chart_inputs)
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          resp_data = response.get_json()["response"]
          assert (
              "frames"
              in resp_data["chart-content"]["children"]["props"][
                  "children"
              ][1]["props"]["figure"]
          )
  
      df = pd.DataFrame([dict(sec_id=i, y=1) for i in range(15500)])
      with app.test_client() as c:
          df, _ = views.format_data(df)
          build_data_inst({c.port: df})
          inputs = {
              "chart_type": "line",
              "x": "sec_id",
              "y": ["y"],
              "z": None,
              "group": None,
              "agg": None,
              "window": None,
              "rolling_comp": None,
          }
          chart_inputs = {
              "cpg": False,
              "cpy": False,
              "barmode": "group",
              "barsort": None,
          }
          extended_aggregation = [
              dict(col="y", agg="sum"),
              dict(col="y", agg="mean"),
          ]
          params = build_chart_params(
              c.port,
              inputs,
              chart_inputs,
              extended_aggregation=extended_aggregation,
          )
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          resp_data = response.get_json()["response"]
          assert "chart-content" in resp_data
  
file_path: dtale/tests/dtale/dash/test_extended_aggregation_charts.py
imports: import pandas
  import pytest
  from pkg_resources import parse_version
  import dtale.global_state
  from dtale.app import build_app
  from tests.dtale import build_data_inst
  from tests.dtale.dash.test_dash import build_chart_params, get_url_parser
  from tests.dtale.test_charts import build_col_def
  from tests.dtale.test_views import URL
label_desc: Use image node_id 3 for calling a global function with example usage: test_line(unittest) without return types