8 Replies Latest reply on Feb 14, 2019 11:29 AM by chia-hua.yu

    Color value in map not showing up in legend


      My product manager identified an oddity in a map that I produced. Please have a look at the screen shots below (I used an eyedropper tool in an image editing program to show the RGB values).

      I have the color of the map attached to a calculated field that a user can select.


      Full dashboard is here. I can't hot link to the direct page because the link isn't stable. If you open "Measure Maps" and select "unintended pregnancy", you'll see another example of where the map shading is darker than the darkest legend color.


      Is this a bug? The problem goes away if I use a continuous color scale but the product manager prefers that we not go down that route. Also, if this was a result of Tableau's binning operation, it seems unlikely that a value would actually fall outside the bins even if the endpoints of the bins don't line up with the ends of the data...


      Darkest map area:


      The darkest bar in the legend is not as dark:


      Our map settings:


        • 1. Re: Color value in map not showing up in legend



          I have created a scenario where the map color is darker than the legend,

          but it may not be the same as yours.


          In the example attached in the Forum thread, on the sheets LOD and Agg, the state color doesn't

          exceed the legend because there is only one value for each State.

          However on the sheet "LOD extra dimension", [Segment] is also on the Detail shelf,

          which causes a stacking of multiple copies of the LOD value on each state.

          This makes Ohio's color darker than it should be because of the stacking of multiple values,

          whereas the legend only looks at single values.


          If allowable, would be grateful if you could post a screenshot of your worksheet

          including the pills on the shelves.


          1 of 1 people found this helpful
          • 2. Re: Color value in map not showing up in legend
            Peter Fakan

            Hi Chia-hua,


            Is the shape in the bottom right hand corner of the viz selected ?



            • 3. Re: Color value in map not showing up in legend

              Hi swaroop.gantela thank you for taking a look. I have "aggregate measures" turned off. I also added "Number of Records" to the bottom line of the tooltip in the screen shot below. Looks like that aberrant county is still showing a single record's data. However, I didn't know that Tableau would overlay multiple shades on a single territory if there were more than 1 record. Interesting.


              • 4. Re: Color value in map not showing up in legend

                Thanks for having a look! I double checked and there's no highlighting applied to the map from shape selection.

                • 5. Re: Color value in map not showing up in legend
                  Sarah Battersby

                  If 'aggregate measures' is turned off, you may have multiple polygons stacked on top of one another.  With multiple polygons stacked up you would see the number '1' for number of records, because it is only giving you the number of records for the top polygon.  Try dragging a selection box that overlaps with the dark region in question (you only need to go over the edge of it to select, that makes it easier to not select any of the surrounding features).


                  Here's an example of the problem that I'm thinking of...  I have state level data with multiple rows per state that I'm aggregating (left) which gives me one polygon for each state and a single value being shown, but if I un-check 'aggregate measures' I get a bunch of copies of each state stacked up, which makes the shading much darker due to the overlap.


                  Note that in the un-aggregated map (center) that the number of records for WA State is listed as 1.  But...if I select the state to select all of the copies stacked up I can see that it's really 39 polygons all on top of one another!  So, check your map to make sure you don't really have multiple polygons stacked up...




                  Tableau Research

                  1 of 1 people found this helpful
                  • 6. Re: Color value in map not showing up in legend

                    Sarah Battersby, thank you for the lead. Indeed there was a discrepancy when I list "Number of Records" vs selecting the area via drag (Screenshots below). When I list the data, it look as as though the 37 items selected for San Juan county are actually the points for render the boundaries for the County. Would points drive coloration in a polygon like that?


                    I also tried selected "Aggregate Measures" in the Analysis dropdonw menu, but that seemed to have no effect on the color as well.


                    A little bit of background: we deliver a twbx that our client publishes on their website. This particular dashboard allows the user to switch geographies (County, Zip, School dist, Legislative dist). However, at the time of publishing, our client is still on Server v 10.1 so we can't use shape files, we use in-shop developed polygon files.


                    Screen Shot 2018-04-18 at 12.43.26 PM.pngScreen Shot 2018-04-18 at 12.42.36 PM.png

                    • 7. Re: Color value in map not showing up in legend
                      Sarah Battersby

                      I'm stumped at this point.  Without being able to look at the workbook it's hard for me to guess what else might be going on. Any chance you could share the workbook?

                      • 8. Re: Color value in map not showing up in legend

                        Just a follow-up, our product manager decided that the statistic we were using (z-scores) were probably too complex for our audience to understand. Also, the map coloration issue described above was causing frustration. We ended up adopting a quintile approach; my more-SQL-having colleague calculated the quintile scores on the backend for me, and I colorized it as a discrete measure so that we could take advantage of legend highlighting.