Dynamic Color Ranges
With dynamic color ranges, you can link color ranges to a parameter's value, enabling you to visualize data trends more effectively. By using parameter actions, you can dynamically update color ranges based on selections or mark hovers, and you can link the start, center, and end points of the color range to a parameter. This not only allows for customization but also helps to ignore outlier data that might skew the color palette. You can also synchronize range values across visualizations on a dashboard, leading to faster insights.
Use supported field and color palette types
You can use a dynamic color range with continuous fields, typically measures. They can be applied to quantitative color palettes in Tableau, including sequential and diverging color palettes.
Sequential color palettes
Typically, a sequential palette shows a single color, varying in intensity. You must specify at least the two end colors in the sequential color range.
Diverging color palettes
A diverging color palette is like two sequential palettes that share a color in the middle but have different extremes. This type of palette shows two ranges of values using color intensity (how dark or light) to show the magnitude of the number and the actual color (orange or blue) to show which range the number is from. Diverging palettes are most commonly used to show the difference between positive and negative numbers.
Configure a dynamic color range
You can configure a dynamic color range on any quantitative, continuous field used in an existing parameter.
-
After your parameter has been set up, select Colors on the Marks card.
-
Select Edit Colors…
-
In the Edit Colors dialog box, expand the dropdown next to the start and end point. You can choose Automatic or Custom, or you can use a parameter to set the color range to update dynamically with parameter actions.
Connect a dynamic color range to a parameter action
You can type in any value you want in a parameter control to ensure a more efficient color contrast. For a more interactive solution, you can configure the parameter so that the color range point is tied to a parameter action.
-
To do this, create a parameter action with these properties:
-
Set the Source Sheet to the worksheet or a sheet on a dashboard.
-
Set the Target Parameter to the parameter that you want to be tied to the dynamic color range.
-
Set the Source Field to a continuous measure used to encode color.
-
Set the Aggregation:
-
Use Minimum or First Quartile for the start of the color range.
-
Use Maximum or Third Quartile for the end of the color range.
-
-
Make sure that Clearing the selection will is set to Keep current value. This ensures that your color palette changes persist between interactions.
With this parameter action, your color range dynamically updates as you interact with marks on the viz.
Understand limitations and edge cases
Dynamic color ranges aren’t updated within Stories.
If you delete the parameter used for the dynamic color range, then the range value will be set to the most recent parameter value. The next time you edit the color, you'll receive a message to choose a new parameter for the dynamic color range.