This topic describes how to configure a timeline chart to display query results.

Description

A timeline chart records one or more events in chronological order. You can view data at specific time points. The data points in a timeline chart are continuous and accurate.

Procedure

  1. Log on to the Log Service console.
  2. Click the target project in the Projects section.
  3. Choose Log Management > Logstores, click the management icon of the target Logstore, and then select Management icon > Search & Analysis.
  4. Enter a query statement in the search box, select a time range, and then click Search & Analyze.
  5. On the Graph tab, click the Timeline chart - 001 icon. The query results are displayed in a timeline chart.
  6. On the Properties tab, configure the properties of the chart.
    Parameter Description
    Time Column Select the field to be displayed on the x-axis. In most cases, select the time field.
    Display Columns Select one or more fields to be displayed on the y-axis.
    Prompt Columns The fields that are prompted when you move the pointer over a field value on the y-axis.
    Display Count The number of events to be displayed on the current page.
    Alternate Display Specifies whether to alternatively display field values on the x-axis and field values on the y-axis. If you turn on the Alternate Display switch, the field values on the x-axis and field values on the y-axis are alternatively displayed.
    Highlight Settings Specifies whether to highlight fields. If you turn on the Highlight Settings switch, you can click Add Highlight Rules to set a highlight rule for fields.

Examples

Execute the following query statement to display the real-time dynamics of the COVID-19 pandemic.
type: news | select news_time as "release time", author as "publisher", title as "title", source as "origin",
case when strpos(url, 'https://') = 1 then substr(url, 9) when  strpos(url, 'http://') = 1 then substr(url, 8) else url end as url from log l right join 
(select max(version) as version from log) r on  l.version =  r.version order by news_time asc limit 50
Timeline chart