Kibana 简明教程
Kibana - Working With Charts
Let us explore and understand the most commonly used charts in visualization.
-
Horizontal Bar Chart
-
Vertical Bar Chart
-
Pie Chart
The following are the steps to be followed to create above visualization. Let us start with Horizontal Bar.
Horizontal Bar Chart
Open Kibana and click Visualize tab on left side as shown below −
Click the + button to create a new visualization −
Click the Horizontal Bar listed above. You will have to make a selection of the index you want to visualize.
Select the countriesdata-28.12.2018 index as shown above. On selecting the index, it displays a screen as shown below −
It shows a default count. Now, let us plot a horizontal graph where we can see the data of top 10 country wise populations.
For this purpose, we need to select what we want on the Y and X axis. Hence, select the Bucket and Metric Aggregation −
Now, if you click on Y-Axis, it will display the screen as shown below −
Now, select the Aggregation that you want from the options shown here −
Note that here we will select the Max aggregation as we want to display data as per the max population available.
Next we have to select the field whose max value is required. In the index countriesdata-28.12.2018, we have only 2 numbers field – area and population.
Since we want the max population, we select the Population field as shown below −
By this, we are done with the Y-axis. The output that we get for Y-axis is as shown below −
Now let us select the X-axis as shown below −
If you select X-Axis, you will get the following output −
选择按词条聚合。
从下拉菜单中选择字段。我们想要按照国家获取人口,所以选择国家字段。我们有以下排序选项:
我们将按最大人口排序,因为我们希望人口最多的国家优先显示。添加了所需数据后,单击指标数据顶部所示的应用更改按钮,如下所示:
一旦你单击应用更改,我们将获得一个水平图形,其中我们可以看到中国是人口最多的国家,其次是印度、美国等。
类似地,你可以通过选择所需的字段来绘制不同的图形。接下来,我们将此可视化效果保存为 max_population,以便以后用于创建仪表板。
在下一部分,我们将创建垂直条形图。
Vertical Bar Chart
单击可视化选项卡,并使用垂直条形图和索引 countriesdata-28.12.2018 创建一个新的可视化效果。
在此垂直条形图可视化效果中,我们将创建以国家地区为维度的条形图,即按照区域面积从大到小对国家进行展示。
因此,让我们选择 Y 和 X 轴,如下所示: