Virtual Parameter + Chart

Hello everyone, I would like to generate a graph that shows me the levels of signals generated by the virtual parameter, the virtual parameter is working normally on devices page, and I am using this code, but without success. Would anyone be able to help me?

Sinal Óptico:
  label: '"Sinal Óptico"'
  slices:
    1_Normal:
      color: "'#00bd7c'"
      filter: VirtualParameters.PonRXPower = "-21"
      label: "'Normal'"
    2_Atenção:
      color: '"#c8d422"'
      filter: VirtualParameters.PonRXPower = "-24"
      label: "'Atenção'"
    3_Critico:
      color: '"#ff7a75"'
      filter: VirtualParameters.PonRXPower = "-30"
      label: "'Critico'"

What does your vparam look like? Is it exposing the value as a string or an int? If its being exposed as an int, then you probably want something that looks like this:

Sinal Óptico:
  label: '"Sinal Óptico"'
  slices:
    1_Normal:
      color: "'#00bd7c'"
      filter: VirtualParameters.PonRXPower >= -21
      label: "'Normal'"
    2_Atenção:
      color: '"#c8d422"'
      filter: VirtualParameters.PonRXPower <= -24 And VirtualParameters.PonRXPower > -30
      label: "'Atenção'"
    3_Critico:
      color: '"#ff7a75"'
      filter: VirtualParameters.PonRXPower <= -30
      label: "'Critico'"
1 Like

@akcoder

Thanks a lot for the help, It worked with your syntax as I wanted.

You are Sensational!