I’m only doing my first real Flux queries this week, so I won’t claim to understand how this works.
But… It seems that _field
is not actually relevant? I used your example to get my panel to work – thanks!!! – and then tinkered and… this worked, too:
|> map(fn: (r) => ({
r: r._time,
c: ${some code to generate the legend label string},
v: r._value
})
)
|> pivot(rowKey: ["r"], columnKey: ["c"], valueColumn: "v")