我想知道如何在直方图中获得更大的条形宽度,例如条形图。
This is the graph how it looks rigth now:
And this is the corresponding query in flux:
在 Grafana 7.3.7 和 InfluxDB 1.8.3 中遇到了同样的问题。
看起来 Grafana 条形宽度对时间序列中的最后一个日期间隔很敏感(使用表格可视化来验证这一点)。
解决方法是使用_start
次而不是_stop
窗户的时代。人们可以通过手动执行转换来做到这一点agregateWindow()
否则会使用(这些转换在docs https://docs.influxdata.com/influxdb/v2.0/query-data/flux/window-aggregate/#unwindow-aggregate-tables).
然后你会:
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)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)