This topic describes how to configure the data source for a widget in DataV and introduces sections in the Set Data Source pane, including Data Source, Data Filter, and Data Response Result.
Configure a data source
- Log on to the DataV console.
- On the Projects page, click the project that you create.
If you have not created a project, see Create a project by using a template.
- In the canvas editor, click a widget in the Layer pane or on the canvas.
- On the right of the canvas editor, click the Data icon.
- On the Data tab, click Set.
- In the Set Data Source pane, modify the data source type and script, configure a data filter, and preview the data response.
Modify the data source type and script
- In the Set Data Source pane, select a data source type from the Data Source Type list.
For more information about the supported data source types and configurations, see Manage data sources.
- In the editing box, modify the data source script.
In the lower-right corner of the editing box, click the icon to edit the data source script in full screen. Click the icon to copy the data source script.
- After you configure the script, click Preview Data Response to preview the response result.
Configure a data filter
Data filters allow you to convert the data structure, filter data, and perform simple calculations.
- In the Set Data Source pane, select Data Filter to enable the data filter function.
- Click the plus sign (+) on the right to add a data filter.
- In the filter editing box, enter code to filter widget data.
- Click Test to view the filter result.
For more information about data filters, see Description of data filter.
View fields in the data response result
View the data response result
In the Set Data Source pane, view the data response result in the Data Response Result section.
The Data Response Result section displays data used by the widget in real time. If the data source of the widget changes, this section displays the latest data. If the widget data is not loaded in time, you can click the icon to obtain the latest data.