I have a dropdown list that contains different sensors to show Voltage and power charts.
I would like to change the plot legend whenever the user changes the values in the dropdown list (in this case the value in dropdown list are tags - showing Watt/voltages/Amp).
From the documentation I read, I udnerstood that I should attach an eveht script and virtual tag, but I do not know how to implement this.
I have attached a screenshot of my dashboard, where I manually attached a plot legend to the chart that corresponds to the tag chosen in the dropdown list. How can I implement this programatically?