8 Replies Latest reply: Oct 15, 2015 9:56 AM by Crystle Stamper RSS

    Set fixed color for single values

    Alexander Müller

      Hi all,

       

      I'm looking for a solution for the problem that the same selection has a different color in different charts.

      My goal is to set a "global color" for every specific value (Value 'A' should always be blue).

       

      An example:

      You have 2 pie charts - the first shows value 'A' in red - the second shows value 'A' in blue.

       

      I tried it with a load command:

       

       

      Load * INLINE [
      X,Y,Z,Function
      0,2,3,A
      200,123,12,B
      0,122,232,C
      212,121,121,D
      124,123,121,E
      ]
      ;

      then I used "RGB(X,Y,Z)" as background color in the expression.

       

      The described procedure works perfectly but now is the challenge: I try to make that selection dynamic (for example if Selection <> Function it should take another inline as basis for coloring). It seems that the background color function doesn't allow any functions.

       

      When I try =if(Selection='Function',RGB(X,Y,Z),if(Selection='Sector',RGB(A,B,C),...) it always shows the 'else' value. Does anyone have an idea how to solve that issue?

       

      An idea how the color selection could be made dynamically (in reason of changes in the dataset) would be awesome!

       

      Looking forward. Thanks!

      Alex