Visualization with changing field name

Hello all

I have a bucket in which I have two fields. “CH1-V1_Percent” and “CH1-V1_Name”.
I can visualize the percent value as a graph. But when I hover the mouse over it I only see the name of the field “CH1-V1_Percent”. How can I do that, that the name from the field “CH1-V1_Name” is displayed instead. Is it possible to change the link between field and value to “value of field1” = “value of field2” in the visualization?
The time stamp is the same for all fields per query (every 10 seconds), the names in the field “CH1-V1_name” can change when reprogramming the machine. Unfortunately, I cannot influence the way of data acquisition. This is specified by the manufacturer of the machine.

Thanks in advance

Hello @fefa92,
So you want the value of the “CH1-V1_Name” field value to show instead of only the “CH1-V1_Percent”?
Can you just select for the name as well?
When I select for two fields in the screen shot below, pivot the data, and then group. You can see that I get the field with the numerical value as well as s

Hello Anaisdg

Thank you for your message. Unfortunately, I have not made it so far. I always get the time in the X and Y direction. As value I get 0.0 and not the name of the vector. But what I need is in the X axis the value (e.g. 0.72%), in the Y axis the time from “CH1-V1_Percent” and as description or name the value from “CH1-V1_Name”. Can you maybe help me?

Below is the code that I use:

from(bucket: "unisorter")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "UB1")
  |> filter(fn: (r) => r["group"] == "SORTING_CH1")
  |> filter(fn: (r) => r["_field"] == "CH1-V1_Name" or r["_field"] == "CH1-V1_Percent")
  |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> group(columns: ["CH1-V1_Name"], mode: "by")
  |> yield(name: "mean")

Thanks a lot
fefa92

Hello @fefa92,
Bear with me…
When you say

But what I need is in the X axis the value (e.g. 0.72%),
What are you referring to? The value for CH1-V1_Name or Percent?

The Time for CH1-V1_Percent should be the same time as for CH1-V1_Name which is also just _time.

You can change the X axis and Y axis values in the customize options at the top left to the right of the visualization type or Graph selector.
Thanks