The bar chart is another form of column chart, that is, a horizontal column chart. It is typically used for top N analysis and is configured in a way similar to a column chart.
- X-axis (vertical)
- Y-axis (horizontal)
- Rectangular block
Each rectangular block has fixed height but varying width to indicate the value. You can use a grouped bar chart to display the data if multiple columns of data are mapped to the Y-axis.
- 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.
- On the Graph tab, click to select the bar chart.
- On the right-side Properties tab, configure the properties of the bar chart.
- Use the bar chart if the number of data types is no more than 20. We recommend that
you use the
LIMITsyntax to control the number of data types. Analysis results may not be clearly displayed if the chart contains excessive rectangular blocks. You can use a
ORDER BYclause for top N analysis. We also recommend that you map no more than five columns of data to the Y-axis.
- Use the grouped bar chart only if different types of data are simultaneously increased or decreased.
- Use the bar chart if the number of data types is no more than 20. We recommend that you use the
|X Axis||The types of data.|
|Y Axis||The numeric data. You can map one or more columns of data to the Y-axis.|
|Legend||The position where the legend is located in the chart. Valid values: Top, Bottom, Left, and Right.|
|Format X-axis||The format in which data is displayed on the X-axis.|
|Margin||The distance of the axis to the borders of the chart, including Top Margin, Bottom Margin, Right Margin, and Left Margin.|
To analyze the
request_uri with the top 10 largest number of visits and display the analysis results in a simple
bar chart, run the following statement:
* | select request_uri, count(1) as count group by request_uri order by count desc limit 10