7 Replies Latest reply: Mar 23, 2012 6:17 PM by John Witherspoon RSS

    Fixed Colors in charts through cyclical dimensions

      So I know how to set fixed colors in the background part of the expression, but am unsure how to get them to stick in a chart when using grouped dimensions.

       

      There are 3 different dimensions in the group and each field of each dimension has an assigned color code. I used this in the background color expression and it almost does what I need

       

      if(len(Sentiment),if(not IsNull(SR), RGB(SR,SG,SB)),

      if(len([Media Type]),if(not IsNull(MR), RGB(MR,MG,MB)),

      if(len(Topic),if(not IsNull(TR), RGB(TR,TG,TB)))))

       

      Here's how it looks. The bars change to the appropriate color as the other two pie charts when I switch to those dimensions. So when its sentiment, the colors will be green, grey, yellow and red, as they are supposed to.

       

      dashboard 1.JPG

       

      The problem is that if I filter down to 1 field or if only one of those fields is represented in any of those dimensions the color defaults to one of the other dimensions colors. For example, here I filtered down to Sentiment = Positive

       

      dashboard 2.jpg

       

      So now even when its still set to show the dimension of Topic all the topics despite still being split out are changed to the same color. I tried changing the order of the expression, but that only fixes it for certain situations and still causes errors in others.

       

      Anyone have any ideas as to work around this? Basically I need the color expression to be fixed to only the current dimension of the group being displayed.