You need to enable JavaScript to run this app.
Intelligent Data Insight

Intelligent Data Insight

Copy page
Download PDF
First Case Study
3.Create Chart Analyses Creation
Copy page
Download PDF
3.Create Chart Analyses Creation

Create four types of charts in visual query: metric card, line chart, bar chart, and table, and configure the chart styles.

1. Create a metric card

1.1 Enter the visual query page

On the dataset page, select the Sales GMV Analysis dataset and click Visual Query in the upper right corner;
Image
Alternatively, click Visual Query directly and use the Sales GMV Analysis dataset.
Image

1.2 Create a field

  • Click the ⋮ icon next to the dataset in the upper left corner and select Add Field to open the Add Field menu.

Image

  • Select order_count and sale_price from Dataset Fields , double-click to add them to the expression on the right, name the field GMV, set the type to Metric, select Save to Dataset, and click the OK button.

Image

1.3 Create a metric card

  • Select Metric Card as the chart type;
  • Drag the GMV metric into the metric bar, drag the order_date dimension into the filter bar, and set the filter to the fixed date "2016-06-01~2016-06-30";
  • In chart analysis, select the Period-over-Period method for analysis.

1.4 Adjust the style and save

  • The Metric Style in chart configuration allows you to adjust the font size of the metric.
  • The Conditional Formatting in chart configuration allows you to adjust the display format of the growth rate.

2. Create a line chart

2.1 Create a line chart

  • Select Line Chart as the chart type;
  • Drag the order_date dimension into the dimension bar and click the field to set the date type to Year-Month, then drag the GMV metric into the metric bar;
  • In chart analysis, select the Reference Line method and configure it to obtain the following chart.

2.2 Adjust the style and save

  • The Legend in chart configuration can be turned off.

Image

3. Create a bar chart

3.1 Create a bar chart

  • Select Bar Chart as the chart type;
  • Drag the GMV metric into the metrics area, drag the Dynamic Dimension into the dimensions area, and in the pop-up Dynamic Dimension configuration page, drag the sale_province and product_type dimensions into the Dynamic Dimension, with the style set to dropdown display;
  • In chart analysis, sequentially select Sort, Top N, and Reference Line to configure, resulting in the following chart.

Image
Image

3.2 Adjust the style and save

  • Set the chart display name for the sale_province and product_type fields to Province and Product Type.

Image
Image

4. Create a table

4.1 Create fields

Add 3 new fields, with the field settings as follows:

  • Field name: Sales year, Dimension, Field expression: year(order_date), save to dataset;
  • Field name: Current year GMV, Metric, Field expression: {fixed [Sales year]: sum([GMV])}, save to dataset;
  • Field name: Current month as a proportion of current year GMV, Metric, Field expression: [GMV]/[Current year GMV], save to dataset.

4.2 Create a table

  • Select the chart type as Table;
  • Drag the GMV metric into the metrics area, and drag the order_date dimension into the dimensions area;
  • In chart analysis, select Period-over-period comparison, add 1 period-over-period and 1 year-over-year, select the calculation metric as sum(GMV), and check calculation type as original value to obtain the following chart.

Image

4.3 Adjust the style and save

  • Through Set field information, you can modify each column header name;
  • Through Set data format, set large values to be displayed in units of ten thousand, and set growth rates and proportions as percentages;
  • Enable the Pager to control the number of rows displayed per page;
  • By setting Conditional formatting - color scale/data bar, you can set the table background style;

Image
Image

Last updated: 2026.06.11 17:26:58