Posts tagged parameter

Week 31: Dynamic Color Legend

August Community Submission Month

Welcome to community submission month. For all 5 of those weeks we’ll have our favorite community submissions as challenges. FYI: You can still submit here.

 
 

Community Submission Challenge #1: Sean Miller

Our first community challenge comes from Sean Miller. Sean is located in Kansas City, Missouri in the United States. He’s worked at Cerner – a large healthcare company – in data visualization for nearly the past five years. He’s also very involved in the Tableau Twitter community. Don’t forget to follow him on twitter. With that, here is Sean:

How to Show/Hide a dynamic color legend

This week we’re digging into Tableau’s color legend. In a recent project at work, I was presented with this same challenge. This was a small piece of a much larger dashboard.

 

The client had a requirement that they wanted to be able to flex between different dimensions and different measures depending on the analytic. Among others were simple bar chart and a chloropleth map (Original challenge was down to the zip code).

 

Additionally, the client only wanted color variation on the map. This presented a challenge because best practice tells us that when there is color variation we must have a legend but Tableau legends do not flex dynamically.

 

Your challenge this week is to replicate the standard color legend so that it flexes along with the selections made in the parameters.

click to view on Tableau Public

Requirements

  • Dashboard size: 800 x 800. Total sheets are part of the challenge.
  • Allow users to select between sales and profit as the measure.
  • The map should have the corresponding measure on color.
  • When the map is active, the color legend and min/max values should show. When subcategory is active the legend and values show be hidden.
  • The color legend should be a stacked bar.
  • The title should update appropriately.

 

Dataset

This week uses the superstore dataset for Tableau 2018.1.  You can get it here at data.world

 

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, @RodyZakovich, and our community contributor @kcmillersean.  (Tag @VizWizBI too – he would REALLY love to see your work!)

 

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

 
 
 

#SPOILERS

  • Tableau sorts differently depending on chart type.

 

#WorkoutWednesday 2018 – Week 3

Rody kicked things off last week with the running_sum() function. This week your challenge will be with both parameters and the window_sum() function. This visualization may look simple but it was a challenge for both Rody and myself (You’ll probably see a variant of this later this year).

Requirements

  • Data should be aggregated to the month.
  • Sales should be for a rolling 3 months
  • Order of the categories is dependent on the values at the parameter date. Larger values are stacked on top.
  • Pay attention to the color of #WorkoutWednesday title
  • Do your best to align the parameter with the x-axis. This way the controller is aligned with the reference line.
  • Match the axis labels and axis (non)titles.
  • Match x-axis major and minor ticks
  • Match the label format.
  • Match the colors using the Superfishel Stone color and Seattle Gray palette.
  • Your chart should range from 2014-Mar-01 to 2018-Mar-30.
  • Make sure your axes are synchronized (of course).
  • Share your your visualization with the parameter set to 2018-Feb-01.

If you need help check out the spoilers below.

This week utilizes the Superstore dataset. You can get it here at Data.World

As you complete this example, feel free to share on Twitter using the #WorkoutWednesday hashtag. Don’t forget to tag @RodyZakovich and @LukeStanke. We really want to see your work.

Good luck!

Spoilers

  • With your window calculations: pay attention to your window_sum() inputs. Read Tableau’s online help on table calculations.
  • This is a dual axis chart.
  • Use an IF statement to compare an aggregate of order date and the date parameter.
  • There are a number of ways to sort the stacks, I used an LOD inside an IF statement.
  • 65% opacity.