The pie chart is used to indicate the ratios of different data types and compare different data types based on the arc length. A pie chart is divided into multiple sectors based on the percentages of various data types. The entire chart indicates the sum of data. Each sector (arc-shaped) indicates the ratio of a data type to the sum. The sum of percentages in all sectors is equal to 100%.

Components

  • Sector
  • Text percentage
  • Legend

Type

Log Service provides three types of pie charts: the default pie chart, the donut chart, and the polar area chart.

Donut chart

A donut chart is a pie chart with a hollow center and has the following advantages:

  • The donut chart adds the display of sum based on the original structure.
  • You may find it difficult to understand the differences between two pie charts simply by comparing them. However, you can compare the ring length of two donut charts to obtain intuitive comparison results.
Polar area chart

A polar area chart is not a donut chart, but a column chart in the polar coordinate system. The data types are divided by arcs and the radius of the arc indicates the data volume. Compared with a pie chart, a polar area chart has the following advantages:

  • The pie chart is suitable if the number of data types is no more than 10. The polar area chart is applicable to scenarios where the number of data types ranges from 10 to 30.
  • The area is the square of radius. Therefore, the polar area chart enlarges the differences among different types of data. It is especially suitable for the comparison of similar values.
  • A circle shows a periodic pattern. Therefore, the polar area chart can also be used to indicate a periodic time, such as weeks and months.

Procedure

  1. On the search page of a Logstore, enter a query and analysis statement in the search box, set the time range, and then click Search & Analysis.
  2. On the Graph tab, click to select the pie chart.
  3. On the right-side Properties tab, configure the properties of the pie chart.
Note
  • Use the pie chart or donut chart if the number of data types is no more than 10. We recommend that you use the LIMIT syntax to control the number of data types. Analysis results may not be clearly displayed if the chart contains excessive sectors of different colors.
  • Use the polar area chart or column chart if the number of data types is more than 10.

Properties

Configuration item Description
Chart Types The type of the chart. Valid values: Pie Chart, Donut Chart, and Polar Area Chart. Default value: Pie Chart.
Legend Filter The types of data.
Value Column The values corresponding to different types of data.
Legend The position where the legend is located in the chart. Valid values: Top, Bottom, Left, and Right.
Format The format in which data is displayed.
Margin The distance of the axis to the borders of the chart, including Top Margin, Bottom Margin, Right Margin, and Left Margin.

Example

Pie chart

To analyze the ratio of the access requestURI, run the following statement:

* | select requestURI as uri , count(1) as c group by uri limit 10
Figure 1. Pie chart


Donut chart

To analyze the ratio of the access requestURI, run the following statement:

* | select requestURI as uri , count(1) as c group by uri limit 10
Figure 2. Donut chart


Polar area chart

To analyze the ratio of the access requestURI, run the following statement:

* | select requestURI as uri , count(1) as c group by uri limit 10
Figure 3. Polar area chart