Cross tables
Cross tables help you extract insights from large volumes of log data and present them in an intuitive tabular layout.
Introduction
A cross table (contingency table) displays data from two or more variables simultaneously. One variable's categories form the rows, and another's form the columns. Each cell shows the frequency or proportion for that combination of categories.
To add a cross table to a dashboard, see Add a chart to a dashboard.
Configuration example
Log on to the Simple Log Service console. In the Projects section, click the project you want.

-
In the left-side navigation pane, choose . In the Dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, choose .
-
On the right side of the page, configure the Chart Type and Query and Analysis Configurations. On the left side of the page, specify the time range, Logstore, and query statement. Then, click Apply at the top of the page to view the chart.
Set chart type to cross table. In the query and analysis configurations section, set aggregate column to
minute, metric column toc, and category column torequest_method. Set Time Range to Last 1 Hour and Logstore tocharts-demo.The following query statement calculates the number of requests per minute for each request method:
* | SELECT minute, c, request_method from ( select date_format(from_unixtime(__time__ - __time__% 60), '%H:%i') as minute, count(1) as c, request_method from log group by minute, request_method order by minute asc limit 100000)
General configurations
Configure global settings for a cross table.
-
Basic configurations
Parameter
Description
Title
The title of the cross table.
Display Title
Turn on Display Title to display the title on the cross table.
Display Border
Turn on Display Border to display borders on the cross table.
Display Background
Turn on Display Background to display the background color for the cross table.
Display Time
Turn on Display Time to display the query time range on the cross table.
Fixed Time
Turn on Fixed Time to fix the query time range so it is not affected by the dashboard's global time range.
-
Standard configurations
Parameter
Description
Format
The display format for numeric values.
Unit
The unit for numeric values.
Number of Digits after Decimal Point
The number of decimal places for numeric values.
Display Name
The display name for table headers.
This renames all headers in the cross table to the specified value. To modify the name of a specific header, use field configurations.
Color Scheme
The color scheme for the cross table, controlling background and text colors.
-
Built-in: Uses the built-in colors.
-
Solid: Uses a single color that you select.
-
Threshold: Displays colors based on the thresholds you configure.
-
-
Query and analysis settings
Parameter
Description
Aggregate Column
The field used for aggregation.
Metric Column
The metric whose values appear in the cross table.
Category Column
The field used for data categorization.
-
Table configurations
Parameter
Description
Display Mode
The display mode of the cross table.
-
Paging: Displays the cross table in a paginated format. You can also use Items Per Page to set the number of rows per page.
-
Fixed Height: Displays the cross table on a single page. You can also use Row Height to set the height of each row.
Display Header
Turn on Display Header to display headers in the cross table.
Total
Turn on Total to display the total number of rows in the cross table.
Transparent Background
Turn on Transparent Background to make the background of the cross table transparent.
Show Progress Bar Tag
Turn on Show Progress Bar Tag to display a label showing the numeric value on the progress bar.
This parameter takes effect only when Cell Display Mode is set to Progress Bar, LCD Progress Bar, or Gradient Progress Bar.
-
-
Field column settings
Parameter
Description
Minimum Column Width
The minimum column width of the cross table, in pixels.
Automatically resized columns will not be narrower than this value.
Column Width
The column width of the cross table.
Maximum Value
The maximum value of the progress bar. Defaults to the maximum value in the current column if not set.
Cell Display Mode
The display mode of cells.
If you set this parameter to Hide, settings for colors and thresholds are not applied.
Alignment Mode
The alignment of content within cells.
Disable Sorting
Turn on Disable Sorting to disable the sorting feature.
Disable Searching
Turn on Disable Searching to disable the search feature.
Search Mode
The search mode.
-
Search: Displays a
icon in the table header to search for specific metric values. -
Filter: Displays a
icon in the table header to filter for specific metric values.
Multiple Choices
Select Multiple-choice to specify multiple metric values in the search or filter box.
Exact Search
-
Turn on Exact Search to return only metric values that exactly match the search term.
-
Turn off Exact Search to perform a fuzzy search. For example, if you search for
abc, all values that containabcare returned.
Font Size
The font size of cell content.
-
-
Thresholds
Parameter
Description
Threshold Mode
The threshold mode.
-
Absolute Value: Sets the threshold based on an absolute value.
-
Percentage: Sets the threshold based on a percentage.
Threshold
The threshold value.
If you set Color Scheme to Threshold and configure a threshold, the text and background of the cross table are displayed in the corresponding threshold colors.
-
-
Variable replacement
Parameter
Description
Variable Replacement
Variable replacement adds a variable-type filter to a single chart. After you configure General Configurations in the General configurations section, a filter appears in the upper-left corner of the chart. Select a value from the filter to replace the variable in the query statement and rerun the query. For a configuration example, see Example 2: Configure variable replacement.
-
Value mapping
Parameter
Description
Value Mapping
Replaces values in the cross table with text or icons.
For example, if you set Value to 200, Mapping Type to Text, and Mapping Value to Success, all instances of 200 in the cross table are replaced with Success.
-
Documentation link
Parameter
Description
Add Documentation Link
Adds a custom documentation link or description in the upper-right corner of the cross table.
Field configurations
Field configurations apply custom visualization settings to specific query results or individual columns. For a description of the configuration parameters, see General configurations.
For example, A > minute applies configurations to the minute field from query A, and A > c applies configurations to the c field from query A. After you configure the color scheme and cell display mode for the two fields, you can use color to distinguish different areas of the cross table.
For example, set Color Scheme to Solid and Cell Display Mode to Background Highlight. After the configuration is complete, different columns in the cross table are distinguished by different background colors.
Interaction occurrences
Interaction occurrences let you configure drill-down interactions for query results or specific columns. Supported types include Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Custom HTTP Link. For more information, see Add interaction occurrences to a dashboard for drill-down analysis.
For example, A > count allows you to configure an interaction occurrence for the count field from query A. If you set the interaction occurrence for the count field to Open Logstore, you can hover over any value in the count column and click Open Logstore to open the specified Logstore.