如何在Kibana中应用条形图的阈值? [英] How can I apply a threshold for a bar graph in Kibana?

查看:308
本文介绍了如何在Kibana中应用条形图的阈值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经经历了这个特别的门票,这几乎涉及到添加一个阈值线,到线图

I've gone through this particular ticket, which pretty much talks about adding a threshold line, to a line graph.

在我的情况下,我有一个条形图这个,我需要一个门槛,让例如在上面的图表中,我应该能够显示每个栏中的差异。

In my case, I'm having a bar graph like this where I need to have a threshold, lets say for example in the above graph itself I should be able to show the difference in each and every bar.

换句话说,如上图所示,它显示 sum chargeamount 根据过滤器给出。我需要做的是,如果 sum chargeamount ,则使用同一个栏中的颜色显示差异大于50,000。

In other words as per the above graph, it's displaying the sum of chargeamount according to the filter I've given. What I need to do is, to show the difference using a color in the same bar itself if the sum of chargeamount is greater than 50,000.

所以有一种方法可以显示过滤器的默认颜色的条(即:小于50,000的颜色),其余的应显示以不同的颜色传达阈值。所以用户可以看到条形图本身的差异,无论他们是否已经达到超过50k。

So is there a way that I can show the bar with the default color for the filter (ie: the ones which are less than 50,000) and the rest should be shown in a different color conveying the threshold. So that the user can see the difference in the bar itself, whether they've achieved more than 50k.

可以使用条形图或者我应该和其他图表一起去吗?

Is this possible using a bar graph or should I be get going with some other graph?

编辑

只是注意到这个问题仍然开放。任何改进,或任何可用atm的工作?

Just noticed that this issue is still open. Any enhancement over that, or any work around available atm?

任何帮助可以赞赏。 :)

Any help could be appreciated. :)

推荐答案

Altough并没有想出这样的东西可能现在可以工作:

Timelion to the rescue! Altough haven't figured out stacking something like this could work for now:

.es(*).if(gt,100,.es(*),null).bars().color(red) .es(*).if(lte,100,.es(*),null).bars().color(blue) .static(100)

这是它的作用:

1.获取值大于100的每个数据点,并将所有其他值都取消。制作一个带有红色的条形图。

1.Get every datapoint with a value greater than 100 and null everything else. Make a bar graph with color red.

2.获取小于等于100的值的每个数据点,并将所有其他值置零。制作一个条形图并将其颜色变红。

2.Get every datapoint with a value less than equal 100 and null everything else. Make a bar graph and color it red.

3.最后绘制一个值为100的行。

3.Finally draw a line at value 100.

你需要做的是用有效的表达式替换 * ,你应该很好去!

What you need to do is replace the * with a valid expression and you should be good to go!

可能是一种减去值并将其添加到另一个图形的方法,但是我还没有想到如何做到这一点。如果我找到一个解决方案,我会更新这个答案。

There might be a way to subtract the value and add it on another graph but I haven't figured out how to do that. If I find a solution I will update this answer.

这篇关于如何在Kibana中应用条形图的阈值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆