Skip to content

Chart Category Grouping & Sorting

The document provides information about a feature called Chart Grouping & Sorting. In AIV (Assumed Interface Viewer), Grouping & Sorting is utilized in the Category Axis. We can create grouping in two types: String and Date Time. Additionally, we can sort by column using either Ascending or Descending orders. In this scenario, we are using the Clustered Column Chart widget, and in the category Axis, we are implementing Grouping and Sorting.1. The Edit menu box appears when you click on the chart icon, as shown in the image below.

Chart Category Grouping & Sorting: This video contains how to use chart category grouping & sorting.

In this example, we create Grouping in two types: String and Date Time. We then sort by column using Ascending order.

  1. Enter the following details in the edit menu of the chart:
  • Dataset: Sales.ds
  • Category Axis: Country
  • Value Column: extendedPrice
  • Aggregation: Sum Image
  1. Click on the Grouping & Sorting Icon beside the Category Axis, as shown in figure below: Image

  2. In Grouping & Sorting, click on the checkbox for Grouping. Image

  3. Enter Following details in Grouping.

  • Type: String
  • Group By: Substring [there are number of groups by options available, user can use any function as per requirement]
  • Sort Type: Ascending
  • Sort By Column: country
  • Expression will be added automatically, as shown in figure below: Image
  1. Click on checkmark [☑] button.

  2. Click on Publish button to complete the widget.

  3. In Group by Substring First three letter of country name will be displayed and columns are displayed in ascending order, as shown in figure below: Image

  4. For Date wise Grouping, edit the chart by clicking the edit icon from top-right corner, enter following details in Charts.

  • Dataset: Sales.ds
  • Category Axis: OrderDate
  • Value Column: orderNumber
  • Aggregation: Sum Image
  1. Go to the Category Axis >> Group & Sorting icon >> Select Grouping.

  2. Enter following details in Grouping.

  • Type: Date Time
  • Group By: DD/MM/YY [there are number of groups by options available, user can use any function as per requirement]
  • Sort Type: Ascending
  • Sort By Column: country
  • Expression will be added automatically, as shown in figure below: Image
  1. Click on checkmark [☑] button.

  2. Click on Publish button to complete the widget.

  3. In Category Axis Date will be display in DD/MM/YY format and columns are displayed in ascending order, as shown in figure below: Image

  4. To perform only sorting by Country, edit chart and then enter following details in Chart.

  • Dataset: Sales.ds
  • Category Axis: country
  • Value Column: quantityOrdered
  • Aggregation: Sum
  1. From Category Axis, click on Grouping & Sorting Icon.

  2. Uncheck the Grouping option if it’s checked.

  3. Select Sorting and enter following details in it.

  • Sort Type: Ascending
  • Sort By Column: Country Image
  1. Click on checkmark [☑] button.

  2. Click on Publish button to complete the widget.

  3. It will display the country name in Ascending order, as shown in figure below: Image