Huawei Cloud Astro Canvas
Huawei Cloud Astro Canvas
- What's New
- Service Overview
- Billing
- Getting Started
-
User Guide
- Using Huawei Cloud Astro Canvas
- Purchasing Instances
- Creating a Workspace
- Creating a Project
- Creating a Page
- Publishing and Installing a Project
- Managing Projects
-
Managing Pages
- Copying a Page
- Publishing a Page
- Modifying Page Settings
- Deleting a Page
- Moving a Page
- Publishing a Page as the Homepage
- Downloading a Page
- Publishing a Page as a Template
- Managing Page Versions
- Setting a Page
- Setting a Share Code
- Configuring Token Authentication
- Configuring Content Security Policies
- Rolling Back the Version
- Verifying the Token Signature on the Sharing Page
- Managing Layers
-
Widgets
- Getting Started with Widgets
-
Charts
- Circle Pie Chart
- Swiper Pie Chart
- Full Moon Pie Chart
- Basic Pie Chart
- Snake Pie Chart
- Rose Pie Chart
- Fade Color Pie Chart
- Line Chart
- Multi Line Chart
- Area Line Chart
- Area Multi Line Chart
- Liquid Fill Chart
- Arrow Liquid Fill Chart
- Water Drop Liquid Fill Chart
- Diamond Liquid Fill Chart
- Triangle Liquid Fill Chart
- Round Rectangle Liquid Fill Chart
- Rectangle Liquid Fill Chart
- Progress Bar Chart
- Progress Bar
- Heat Map
- Funnel Chart
- Two-Way Bar Chart
- Line Bar Chart
- Horizontal Bar Chart
- Horizontal Multi Bar Chart
- Data Marker Bar Chart
- Waterfall Bar Chart
- Bar Chart
- Scatter Chart
- Bubble chart
- Radar Chart
- Media
- Sting
- Maps
- Decoration
- Dashboard
- Others
- Menu
- ECharts
- 3D Scene Editor
-
Widget Management
- Adding a Widget
- Dragging a Widget
- Aligning Widgets
- Locking or Unlocking a Widget
- Hiding a Widget
- Renaming a Widget
- Saving a Widget as a Card
- Copying and Pasting a Widget
- Copying a Widget to Other Pages
- Deleting a Widget
- Creating a Group
- Description of Custom Widgets
- Customizing Event Interactions for ECharts Widgets
- Customizing Interactive Actions for ECharts Widgets
- Using the Background Pagination Function of Advanced Tables
- Using the Background Sorting Function of Advanced Tables
- Using the Background Filtering Function of Advanced Tables
- Interaction Configuration
- Data Access
-
Data Center
- Converter Management
- Connector Management
- Data Source Management
-
Dataset Management
- (Optional) Creating a Folder
- Static Data Datasets
- Relational Database Datasets
- ROMA Connector Datasets
- Huawei Cloud Astro Zero API Datasets
- Huawei Cloud Astro Zero Datasets
- DLI Datasets
- DWS Datasets
- HTTP Connector Datasets
- Prometheus Datasets
- Copying a Dataset
- Copying a Dataset to Another Workspace
- Sharing a Dataset
- Deleting a Dataset
- Asset Management
- Admin Console
- Global Variables
- Custom Widget Development Specifications
- Private Deployment
- Best Practices
- General Reference
On this page
Show all
Help Center/
Huawei Cloud Astro Canvas/
User Guide/
Widget Management/
Using the Background Sorting Function of Advanced Tables
Copied.
Using the Background Sorting Function of Advanced Tables
Scenario
The background sorting function requires global variables. When background pagination, sorting, and filtering are enabled together, add the filtering, sorting, and pagination converters one by one, as shown in Figure 1.
Background Sorting
- Log in to Huawei Cloud Astro Canvas by referring to Logging In to Huawei Cloud Astro Canvas.
- Create a background sorting converter.
- Choose Data Center from the main menu.
- In the navigation pane, choose Converters > All and click Create.
- Enter a converter name and select a folder, and click Confirm.
- Enter the converter code and click Save.
let data = [...dataset]; const sortType = $pageStore.sortType; const sortField = $pageStore.sortField; if (sortType && sortField) { if (sortType == 'ascending') { data.sort((a, b) => { return isNaN(Number(a[sortField])) ? b[sortField].localeCompare(a[sortField]) : b[sortField] - a[sortField]; }); } else { data.sort((a, b) => { return isNaN(Number(a[sortField])) ? a[sortField].localeCompare(b[sortField]) : a[sortField] - b[sortField]; }); } } return data
- Create a large screen page, drag the advanced table widget from the All > Text area to the blank area of the canvas.
- Enable the background sorting function.
Figure 2 Enabling the background sorting function
- Create global variables.
The background sorting function requires global variables. Create sortType and sortField variables.Figure 3 Creating global variables
- Set the interaction.
- Select the advanced table widget and click
to configure the widget interaction.
- Add an interaction action when sorting is clicked.
Figure 4 Interaction action when the sorting button is clicked
- Select the advanced table widget and click
- Set the widget data source.
- Select the widget. Click
above the widget.
- Select the required data type.
- Under the global variable configuration, click +, select a converter, and add the converter created in 2.
Figure 5 Adding a converter
- In the widget preview, drag the fields in the table to the corresponding configuration area.
Figure 6 Dragging fields to the corresponding configuration area
- Click Save.
- Select the widget. Click
- Save the page and preview the effect.
Figure 7 Checking the background sorting effect
Parent topic: Widget Management
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot