1 Reply Latest reply: Dec 7, 2017 10:36 AM by Kathrine Spang RSS

    Color lines with expression, line chart

    Kathrine Spang

      The measurements added to the line chart are

      avg({<signal={"AA"}>}  [Measurement])

      avg({<signal={"BB"}>}  [Measurement])

      avg({<signal={"CC"}>}  [Measurement])

      avg({<signal={"DD"}>}  [Measurement])


      And dimension date. This works fine and I get four lines one for the measurements corresponding to each signal name.


      The i try to color them by expression since I want to customize the colors. This is where I get stuck. I've tried the following:

       

      if(([signal]='AA'), [Measurement]= red(),

           if(([signal]='BB'),  [Measurement]=green(),

                if(([signal]='CC'),[Measurement]=black(),

                     if(([signal]='DD'),[Measurement]=yellow(),blue())

                 )

            )

      )

       

      (this one I also tried with RGB code. and without the "[Measurement]=" part

       

      and

       

      if((avg({<signal={"AA"}>}  [Measurement])), red(),

           if((avg({<signal={"BB"}>}  [Measurement])), green(),

                if((avg({<signal={"CC"}>}  [Measurement])'),black(),

                     if((avg({<signal={"DD"}>}  [Measurement])), yellow(),blue())

                 )

            )

      )

       

      and

       

      pick(WildMatch((avg({<signal={"AA"}>}  [Measurement])),

      (avg({<signal={"BB"}>}  [Measurement])),

          (avg({<signal={"CC"}>}  [Measurement])),

              (avg({<signal={"DD"}>}  [Measurement]))),

      red(),

      blue(),

      green(),

      yellow()

      )

       

      and some other variants on these.

       

      Would be so thankful for help