You can use a flow chart to visualize the results of multiple query statements. You can also configure personalized display settings on the Field Configuration tab. This topic describes how to configure a flow chart.
Overview
A flow chart, also known as a ThemeRiver, is a stacked area chart around a central axis. In a flow chart, lines of different colors represent different categories. By default, the time information of data is mapped to the x-axis of a flow chart. This enables the three-dimensional visualization of data.
For more information about how to add a flow chart, see Add a chart to a dashboard.
Configuration effect
Flow chart type | Sample flow chart | References |
Sample configuration
Basic flow chart
Log on to the Simple Log Service console. In the Projects section, click the project you want.
In the left-side navigation pane, choose Dashboard > Dashboards. In the dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, click Add > Add Chart.
![image](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/8483519271/p857236.png)
On the right side of the Edit Chart page, choose . On the left side of the Edit Chart page, enter a query statement and click Last 15 Minutes to specify a query time range.
Query Statement A:
* | select __time__,count(0) as pv group by request_method,__time__
Make sure that the values of the __time__ field on the x-axis are UNIX timestamps, Time Series Mode is turned on in the upper part of the Edit Chart page, and the Format parameter in the Axis X section is Year-Month-Day Hour:Minute:Second,YYYY-MM-DD HH:mm:ss
. For more information, see Time series mode.
![image](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/5279070371/p865408.png)
Other settings
Flow chart setting | Description | Sample flow chart |
Set the Flow Chart Type parameter to Line Chart, Area Chart, Column Chart, or Cross Table | Line Chart: You can use a line chart to display data changes over time and analyze the periodicity of data trends and changes. Area Chart: An area chart is similar to a line chart. The difference is that you can use an area chart to clearly compare the changes among data series and display the proportions of different parts to the whole. Column Chart: Column charts are suitable for comparing and analyzing data. You can use a column chart to compare data of different categories and clearly display the differences among categories. Cross Table: Cross tables are suitable for comparing and analyzing multi-dimensional data. You can use a cross table to display the distribution and association of multi-dimensional data.
For more information, see Configure the type of a flow chart. | ![image](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/8828252371/p865789.png)
|
Configuration on the General Configurations tab
Parameters in the Basic Configurations section
Parameter | Description |
Title | The title of the flow chart. |
Display Title | If you turn on Display Title, the title of the flow chart is displayed. |
Display Border | If you turn on Display Border, the borders of the flow chart are displayed. |
Display Background | If you turn on Display Background, the background color of the flow chart is displayed. |
Display Time | If you turn on Display Time, the query time range of the flow chart is displayed. |
Fixed Time | If you turn on Fixed Time, the query time range of the flow chart is independent of the global time range of the dashboard. |
Parameters in the Standard Configurations section
Parameter | Description |
Format | The display format of numeric values. |
Unit | The unit of numeric values. |
Number of Digits after Decimal Point | The decimal places of numeric values. |
Display Name | The name of the legend. If you specify a value for the Display Name parameter, the value is used as the name for all items in the legend that is displayed in the flow chart. If you want to change the name of an item in the legend, you can configure parameters on the Field Configuration tab. |
Color Scheme | The color scheme that specifies the background color and legend colors of the flow chart. Valid values: |
Parameters in the Query and Analysis Configurations section
Parameter | Description |
Axis X Field | The field that you want to use as the x-axis. Simple Log Service automatically selects a field as the x-axis. |
Axis Y Field | The field that you want to use as the y-axis. Simple Log Service automatically selects a field as the y-axis. |
Aggregate Column | The field based on which you want to further categorize and aggregate data. |
Parameters in the Data Configuration section
Parameter | Description |
Data Completion | If you turn on Data Completion, Simple Log Service automatically replaces missing values with a specified value from the first data record within the time window specified by the Completion Window parameter. |
Completion Window | The time window of data for which Simple Log Service automatically replaces missing values with a specified value. Minimum value: 0. Unit: seconds. By default, Simple Log Service automatically specifies the value of the Completion Window parameter. |
Text-substituted Value | The value that you want to use to replace missing values. Default value: 0, which indicates that Simple Log Service replaces missing values with 0. |
Maximum Categories | The maximum number of categories. If the number of categories is too large, stuttering may occur. We recommend that you specify no more than 50 categories. |
Parameters in the Tooltip Configurations section
Parameter | Description |
Sorting Order | The sorting method of data. |
Parameters in the Legend Configurations section
Parameter | Description |
Display Legend | If you turn on Display Legend, the legend of the flow chart is displayed. |
Legend Position | The position of the legend in the flow chart. |
Actions | The data display effect when you click a legend item. Valid values: Single: If you click a legend item, only the data for the legend item is displayed in the flow chart. Switch: If you click a legend item, the data for the legend item is hidden or displayed in the flow chart.
|
Maximum Width (Height)% | The maximum width and height of the legend. |
Parameters in the Axis X section
Parameter | Description |
Display Axis X | If you turn on Display Axis X, the x-axis of the flow chart is displayed. |
Axis X Title | The title of the x-axis. |
Axis X Height | The height of the x-axis. By default, Simple Log Service automatically specifies the height of the x-axis. |
Parameters in the Axis Y section
Parameter | Description |
Display Axis Y | If you turn on Display Axis Y, the y-axis of the flow chart is displayed. |
Axis Y Title | The title of the y-axis. |
Axis Y Position | The position of the y-axis. |
Axis Y Width | The width of the y-axis. By default, Simple Log Service automatically specifies the width of the y-axis. |
Maximum Value | The maximum value of the y-axis. By default, Simple Log Service automatically specifies the maximum value of the y-axis. |
Minimum Value | The minimum value of the y-axis. By default, Simple Log Service automatically specifies the minimum value of the y-axis. |
Elastic Maximum Value | The elastic maximum value of the y-axis. The elastic maximum value takes effect only when all values of the y-axis are less than the elastic maximum value. By default, Simple Log Service automatically specifies the elastic maximum value of the y-axis. |
Elastic Minimum Value | The elastic minimum value of the y-axis. The elastic minimum value takes effect only when all values of the y-axis are greater than the elastic minimum value. By default, Simple Log Service automatically specifies the elastic minimum value of the y-axis. |
Axis Y ID | The ID of the y-axis. If you configure only one y-axis on the General Configurations tab, this parameter does not take effect. If you want to configure multiple y-axes, you must configure the required parameters on the Field Configuration tab. The ID of the y-axis is a string. A y-axis that has a specified ID represents a unique y-axis in a flow chart. The specified ID for the y-axis takes precedence over the unit that you specify in the Standard Configurations section. For example, if two y-axes have the same unit, they are merged into one y-axis. If two y-axes have the same unit but different IDs, they are displayed as two y-axes. |
Parameters in the Chart Configurations section
Parameter | Description |
Chart Type | The type of the flow chart. Note The available parameters in the Chart Configurations section vary based on the type of the flow chart that you specify. If you set the Chart Type parameter to Line, the following parameters are available: |
Connection Mode | The connection mode of the lines in the flow chart. |
Line Width | The width of the lines. |
Display Point | Specifies whether to display points in the flow chart. |
Transparency | The transparency of the flow chart. |
Point Size | The size of the points in the flow chart. |
Gradient Mode | The gradient mode of the flow chart. Valid values: Transparency: If you select this mode, the flow chart uses a color gradient that is affected by the line color and the value of the Transparency parameter. No Gradient: If you select this mode, the flow chart does not use a color gradient. The line color is used in the flow chart.
|
Parameters in the Variable Replacement section
Parameter | Description |
Variable Replacement | The settings for variable replacement. You can click AddVariable Replacement to add a filter of the Variable Replacement type to the table. After you configure the settings for variable replacement on the General Configurations tab, Simple Log Service adds a filter in the upper-left corner of the table. You can select a value from the filter drop-down list. Then, Simple Log Service automatically replaces the variable in the query statement of the table with the variable value indicated by the value that you select, and performs a query and analysis operation. For more information, see Example 2: Configure variable replacement. |
Parameters in the Documentation section
Parameter | Description |
Add Documentation Link | The button that allows you to specify custom document links and descriptions. After you configure the settings, the specified information is displayed in the upper right corner of the flow chart. |
Configuration on the Field Configuration tab
You can configure personalized display settings for the results of a single query statement or for a single column of data in the results. For more information, see Configuration on the General Configurations tab.
For example, in the A section, you can configure personalized display settings for the results of Query Statement A. In the B section, you can configure personalized display settings for the results of Query Statement B. You can specify the thickness of each line to distinguish the results of the two query statements. In the following figure, the thick line indicates the results of Query Statement A, and the thin line indicates the results of Query Statement B.
![流图Pro](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/3859046561/p351736.png)
Configuration on the Interaction Occurrences tab
You can configure an interaction occurrence for a single field or the results of a single query statement to analyze data in a finer-grained manner. Supported types of interaction occurrences include Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Create Custom HTTP URL. For more information, see Interaction occurrences.
For example, in the A section, you can configure an Open Logstore interaction occurrence for the results of Query Statement A. After you configure the interaction occurrence, you can click a point on a line of the flow chart and click Open Logstore. Then, you are navigated to the Logstore that you specify.
![流图Pro](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/3859046561/p351732.png)
Sample flow chart (Line specified for the Chart Type parameter)
* | select __time__ - __time__% 60 as minute, count(1) as c, request_method group by minute, request_method order by minute asc limit 100000
![image](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/8828252371/p856558.png)