Pop-up personnalisés

0
66

QlikView: Custom Pop-up Labels

Let’s say I have a grouped chart with two expressions, Sales and Costs. I like the look of this chart, but there’s more information that can be provided to tell a better story, such as Margin and Margin %. So how can I add the additional information without altering the look of my chart? Custom pop-up labels are an ideal solution in this case because they allow the designer to include additional metrics without creating an overwhelming, hard to digest visualization. Follow the steps outlined below to create your custom labels.

1. Create a chart and add dimension(s)

2. Create two expressions (Sales and Costs).

 

3. Go to the presentation tab and uncheck the Pop-up Labels checkbox. This is necessary otherwise you will end up with multiple sets of pop-ups.

 

4. Navigate back to the expressions tab and create a third expression. Enter the following code.

 

Notice that instead of formatting my currency amounts in the expression as part of the num function,  I used the MoneyFormat variable. The MoneyFormat variable is one of the standard QlikView variables that is automatically generated when you first open the script editor. If you want to alter the format of the currency values, make the change in the script editor and reload the script.

 

5. With the new expression highlighted, perform the following tasks under Display Options:

  • Uncheck the Bar checkbox
  • Select the Text as Pop-up checkbox

 

The icon will change indicating that this new metric will not render with any bars.

Click Finish and now when the user hovers their cursor over a particular brand they will get custom pop-up labels providing Sales, Costs, Margin and Margin % information.

Hope this design tip comes in handy. If you have any questions or comments please feel free to reach out.

LEAVE A REPLY

Please enter your comment!
Please enter your name here