1 Reply Latest reply on Feb 25, 2012 10:06 AM by Jonathan Drummey

    Dynamically Changing Font Color

    Jason Strimpel

      Greetings,

       

      I created a heat map and some of the values create dark reds and greens. Is there a way to change the font color dynamically based on the value? For example, for the most extreme values, I would like a white or grey font color to more clearly show the value.

        • 1. Re: Dynamically Changing Font Color
          Jonathan Drummey

          I'm presuming you were looking for some way to color the labels of the heat map marks? If so, that's not possible, Tableau only allows one color for all mark labels.

           

          However, like most things in Tableau, there's a workaround, and that's to create a dual-axis chart where one measure displays the heat map, say as the Square mark type and the second displays the labels as text fields using the Text mark type. Since each mark has its own Marks card, you can set the Color and Size of each to be different.

           

          The alignment trick is to create calculated fields like Half - 0.1 and One - 1 that are used as the axes, so that way everything in the column is in the same place. The measures of interest are then placed on the Size, Color, Text, etc. shelves. Sample workbook is attached.

           

          Jonathan