Hi, I am struggling to wrap my brain around getting flux + Chronograf to visualize more than one series.
Eg, how can I get both the median and the 95th percentile as separate series, but plotted on the same chart?
This is the documentation page I’ve been referencing. For a single series, it works fine, but every attempt with multiple series has given an error
Edit: something equivalent to this
scott
July 29, 2020, 3:27pm
2
Line graphs in the InfluxDB 2.0 UI create a separate line for each table in your output data and only visualize values from the _value
column. To visualize both in the same graph, you can create two separate streams and union them together:
data = from(bucket: "example-bucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(...)
median = data |> aggregateWindow(every: v.windowPeriod, fn: median) |> set(key: "aggType", value: "median")
percentile = data |> aggregateWindow(every: v.windowPeriod, fn: (tables=<-, column) => tables |> quantile(q: 0.95) |> set(key: "aggType", value: "percentile")
union(tables: [median, percentile]
2 Likes
Thanks for this , was exactly what I was after!
system
Closed
August 7, 2020, 8:25pm
4
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.