3 Replies Latest reply on Feb 16, 2016 3:29 PM by Joe Oppelt

    One label font-color that displays well for all bar colors?

    Joe Oppelt

      I've seen some questions about picking a label color that displays well in all bar colors.

       

      Actually, Tableau takes a good stab at picking a font color for us.  In most cases we'll get white text color if the bar is a deep, dark color, and black text color if the bar color is light.  But that's effective only when all the text fits within the bar itself.  If even one pixel of one character extends outside the bounds of the bar, all bets are off.

       

      In the attached I have simulated a bar chart that we're displaying here.  It's a stoplight-type viz, and I have used the red-green-yellow shades that the user wants for the bar.  Sometimes the bar is short, and the label extends beyond the end of the bar.  In most cases the bar is long enough that most of the text is still contained within the bar.  (In the attached, that condition is represented by the center bar for each color.)

       

      The background color in the left column of vizzes is the background for most sheets in the actual application.  But we're playing with other backgrounds too (thus the white backgrounds in the example.)

       

      In messing with this, I have come to the conclusion that what we really need is a "zebra" font color -- white font with black border, or black font with white border.  Such a text color would show up on any background.  (The idea isn't limited to Tableau either.  I wish they did that with subtitles in movies, credits, closed captioning, etc.)

       

      I guess my question here is whether people think the idea is worthy of posting in the IDEAS forum.  If it's technically prohibitive, I shouldn't waste my time or Tableau's.

       

      Thoughts?

        • 1. Re: One label font-color that displays well for all bar colors?
          Simon Runc

          hi Joe...Not sure, as you say, on the technical feasibility, but I would certainly vote this idea up. I also think Tableau does a pretty good job of keeping the font visible for light and dark bars, but when the text goes over the bar (which I encounter quite a bit...in retail there is always a 'tail' of products/stores which are negligible but need to be shown as they contribute to the 'whole'). I've had quite a few occasions where I've adapted the colour scheme from what I wanted to use, and then 'hard' coded the font label colour and have it visible both in and out of Bars.

           

          I'd be happy this be the default behavior (how the light and dark are currently handled) and then a way to turn it off in some obscure settings menu. I'm always hesitant of adding too many 'tick boxes' in the main formatting controls, but would probably want the ability to turn it back on some occasions.

           

          Let me know if you do create the idea and I'll get voting!

          • 2. Re: One label font-color that displays well for all bar colors?
            Sean Boon

            Joe,

             

            You might also want to take a look at a new feature that we added to the product not too long ago.  On the Marks Card if you expand the label options, if you open up the font settings one of them is "Match mark color".  That will attempt to make the label text match somewhat closely to the mark color.  I tried it on a few of the sheets in your workbook and it improved the results on those sheets.

             

            -Sean

            • 3. Re: One label font-color that displays well for all bar colors?
              Joe Oppelt

              Well that's new. 

               

              It's a 9.2 feature, for the record.  I gave it a try in 9.2.  This could be helpful, though part of the struggle I'm trying to address is when the label crosses from one color (dark bar, for example) to another (light background.)

               

              I'll keep that for my bag of tricks when we upgrade.