All Products
Search
Document Center

Simple Log Service:Display query results on a timeline chart

Last Updated:Feb 01, 2024

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

Background information

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

Procedure

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the project that you want to manage.

  3. On the Log Storage > Logstores tab, click the Logstore that you want to manage.

  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 时间轴-001 icon.

  6. On the Properties tab, configure the properties of the timeline chart.

    Parameter

    Description

    Time Column

    The field to be displayed on the time column. In most cases, the time field is selected.

    Display Column

    The field to be displayed on the display column. You can select multiple fields.

    Prompt Columns

    The field that is prompted when you move the pointer over a field value on the display column.

    Data Column

    The number of events to be displayed on the current page.

    Alternate Display

    Specifies whether to use an alternate method to display field values on the time column and field values on the display column. If you turn on Alternate Display, the field values on the time column and field values on the display column are alternatively displayed.

    Highlight Settings

    Specifies whether to highlight fields. If you turn on Highlight Settings, you can click Add Highlighting Rule to specify a highlighting rule for fields.

Example

To display the status of the COVID-19 pandemic in real time, execute the following query statement:

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

时间轴