Highlight chart selection

in 6 steps using parameters

This blog will illustrate how to highlight chart selection by using a parameter and how to remove the black line outside the selected part of the chart.

For the purpose of this blog we will use superstore dataset and we’ll build a simple bar chart using sub-categories and profit (Step 1)

Step 2: Create a parameter with the following configuration:

This parameter is configured for our selection of a sub-category. For different values we will need to adjust the configuration to reflect the value. Show the parameter on the canvas.

Step 3: Add a parameter action to change the parameter to the selected part of the chart. This is done by clicking on Worksheet-Actions or Ctrl+shift+A and then click on Add action. Here is the configuration of the action:

Step 4: Create a calculated field to use for colouring the selection and drop it on the color shelf.  

We already have the selected sub-category in a different color.

But we have to click out of it to get the full color back on the other bars and to remove the black border around the selected bars. The following steps will deal with this small issue.

Step 5: Create two Dummy fields to help with bringing the colour back to the unselected parts of the chart and drop in on the details shelf.

Step 6: Configure an action to deal with the black border and fading unselected values:

Let’s see if that works for a line chart. I simply change the chart type to a line chart. And voilà!

Author:
Zdravka Bratuhtcheva
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab