I am trying to migrate from InfluxQL to Flux but when displayed in a chart I get strange results and I was not able to solve it.
InfluxQL query and chart:
SELECT mean("machine_temperature") FROM "machine" WHERE time >= 1677625200000ms and time <= 1679039209170ms GROUP BY time(20m) fill(null)
This is the same basic version in Flux:
from(bucket: "mybucket")
|> range(start: -30d, stop: -26d)
|> filter(fn: (r) => r["_measurement"] == "machine")
|> filter(fn: (r) => r["_field"] == "machine_temperature")
|> aggregateWindow(every: 1h, fn: mean, createEmpty: false)
|> yield(name: "Mean")
But in the chart I get multiple stacking lines, each for every tag with different colors. There are also "gaps" between parts of the chart and it appears broken. Why is it?
I tried reading all the guides about migration from InfluxQL and all the guides about Flux but I was not able to get a clean chart.
Is there something very basic that I am missing?
Please note that the two charts are generated on the same database.