Kibana 简明教程

Kibana - Working With Graphs

在本章中,我们将讨论可视化中使用的两种类型的图表——

  1. Line Graph

  2. Area

Line Graph

首先,让我们创建一个可视化,选择一条折线图来显示数据并使用 contriesdata 作为索引。我们需要创建 Y 轴和 X 轴,详细信息如下所示——

For Y-axis

line graph y axis

请注意,我们已采用 Max 作为聚合。因此,这里我们将展示折线图中的数据呈现。现在,我们将绘制图表,展示国家/地区的最高人口。我们选取的字段为人口,因为我们需要按国家/地区划分最大值人口。

For X-axis

line graph x axis

在 x 轴上,我们已采用术语作为聚合、Country.keyword 作为字段和指标:Max Population for Order By,顺序大小为 5。因此,它将绘制人口最多的 5 个国家/地区。应用更改后,您可以看到折线图,如下所示——

line graph changes

因此,我们拥有中国人均最多的国家,其次是印度、美国、印度尼西亚和巴西这 5 个人均最多的国家。

现在,让我们保存此折线图,以便稍后在仪表板中使用。

save line graph

单击“确认保存”,您便可以保存可视化。

Area Graph

转到可视化并选择以 countriesdata 为索引的区域。我们需要选择 Y 轴和 X 轴。我们将绘制国家/地区的最大面积的面积图。

So here the X- axis and Y-axis will be as shown below −

area graph
area graph axis

After you click the apply changes button, the output that we can see is as shown below −

area graph changes

From the graph, we can observe that Russia has the highest area, followed by Canada, United States , China and Brazil. Save the visualization to use it later.