elasticsearch - 使用Kibana在同一条形图上显示两个字段

标签 elasticsearch charts visualization kibana

我想做一个像这样的图表:

The chart I want to generate

因此,我有两个字段“rest_of_the_world”和“china”要显示在同一条形图上。 Y轴应该是包含X值(计数)的文档数。

例如,我有150个文档在“rest_of_the_world”字段中具有“1996”,而“15个文档在“china”字段中具有“1996”。

可以使用Kibana制作这样的图表吗?并有可能绘制两者之间的差异吗?

最佳答案

这是一个古老的问题,但是我正在寻找教程或某种东西来绘制这种图表。这是您必须做的:

-Go to [Visualize] menu, then click on the [ + ] button to add a [Vertical bar] chart
-Choose your index
-On the Metrics panel expand the [Y-Axis] options (witch selected type should be Count)
-Change the [Aggregation] to Sum
-In [Field] choose the index field/column representing the number of documents

-On the Buckets panel expand [X-Axis] options
-Put on [Aggregation] the field/colum representing the year 
 (or, if there are many records with date choose {Date histogram}, select the 
 field with that date and choose {Yearly} in the [Interval])

-Then click on the [Add sub-buckets] button on the bottom of Buckets panel
-On [Sub Aggregations] choose Terms
-On [Field] choose the field/column representing the place of document

就是这样!

关于elasticsearch - 使用Kibana在同一条形图上显示两个字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46049048/

相关文章:

elasticsearch - flink : handling backpressure (source: kafka, 接收器:elasticsearch)

mysql - Elasticsearch 与 MariaDB 的数据完整性问题

javascript - 使用 react-stockchart 的市场深度图?

Excel:如何将自定义网格线添加到图表中?

iphone - 是否有同时适用于 iphone 和 android 应用程序的图表库?

javascript - D3 版本 5,如何将 Promise 链接到图表构建

elasticsearch - 具有复杂对象的Kibana可视化

elasticsearch - 如何在Elasticsearch中比较文本类型的数量

python - 如何在Python中绘制重叠簇

r - 如何根据节点所属的组动态为节点着色?