Help Center/ Huawei Cloud Astro Canvas/ User Guide/ Data Access/ Introduction to Page Data Sources
Updated on 2025-03-24 GMT+08:00

Introduction to Page Data Sources

A widget is an element on a page. Configuring a page involves setting up widget data. In Huawei Cloud Astro Canvas, the data sources of widgets come from preset bridges, static data, datasets, relational databases, ROMA connectors, Astro Zero, and HTTP connectors). Select a widget and click above it to configure its data source.

Figure 1 Configuring data for a widget
  • Non-data sources
    • Preset bridges

      A bridge can call a backend API to obtain backend data. For details, see Preset Bridges.

    • Static data

      If you select this mode, the page obtains static data from the input data and displays it on the page. For details, see Static Data.

      Static data is preset in Huawei Cloud Astro Canvas. You can also customize the static data.

    • Datasets

      Select the dataset configured in Data Center as the widget data source. If you select this mode, ensure that the dataset has been created in the data center. For details, see Data Center.

      Not all widgets support data source configuration. You can configure data sources only for those with dataSetting configured in their property configuration code. For example, the code in the BarChart_Widget.editor.js file of the bar chart is as follows:

      propertiesConfig: [
          {
      config: [
                  {
                      "type": "connectorV2",
                      "name": "BarOrLineChartDataConnector",
                      "label": "BarOrLineChartDataConnector",
                      "model": "SingleRepireDataViewModel",
                      "value": ""
                  },
                  {
                      "type": "dataSetting",
                      "mapping": {
                          "x": {
                              "type": "category",
                              "label": "x",
                              "required": true
                          },
                          "y": {
                              "type": "value",
                              "label": "y",
                              "required": true
                          },
                          "s": {
                              "label": "s",
                              "series": [
                                  {
                                      "type": "",
                                      "label": "",
                                      "required": false
                                  }
                              ]
                          }
                      },
                      "mock": {},
                      "model": "SingleRepireDataViewModel"
                  }
              ]
          }
      ],
    • Page dataset: Multiple widgets can connect to the same data input, reducing repeated requests and configurations. For details, see Page Datasets.
  • Data sources

    Data can be directly obtained from data sources (such as relational databases, ROMA connectors, DLI, and DWS) and displayed on the page. For details, see Other Data Sources.