Grafana酒吧的宽度要小 [英] Grafana bar width to small

查看:69
本文介绍了Grafana酒吧的宽度要小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在直方图中像条形图那样获得更大的条形宽度.

i would like to know how i could get a bigger bar width in my histogram like bar graph.

此图现在看起来很严谨:

This is the graph how it looks rigth now:

这是flux中的相应查询:

And this is the corresponding query in flux:

推荐答案

在Grafana 7.3.7和InfluxDB 1.8.3中遇到了相同的问题.

Encountered the same issue with Grafana 7.3.7 and InfluxDB 1.8.3.

Grafana条形宽度似乎对时间序列中的最后一个日期间隔敏感(使用表格可视化效果对此进行验证).

It looks like Grafana bar width is sensitive to the last date interval in the time series (use a Table visualization to verify this).

一种解决方法是使用Windows的 _start 次而不是 _stop 次.可以通过手动执行否则将使用 agregateWindow()的转换来做到这一点(这些转换在

A workaround is to use _start times instead of _stop times of the windows. One can do this by performing the transformations manually that agregateWindow() would otherwise use (these transformations are described in the docs).

您将拥有:

from(bucket: "piMeter")
  |> range(start: -1d)
  |> filter(fn: (r) => (
    r._measurement == "downsampled_energy" and
    r._field == "sum_Gesamt")
  )
  |> fill(value: 0.0)
  |> window(every: 1h)
  |> sum()
  |> duplicate(column: "_start", as: "_time")
  |> window(every: inf)

这篇关于Grafana酒吧的宽度要小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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