Legacy Viztips Overview
Legacy Viztips feature brings the Vizlib KPI Designer into other extensions, as a rich, fully customisable tooltip. Legacy Viztips now supports all Vizlib KPI Designer layer types - Text, Icon, Image, Line, Bar Chart, Line Chart, Bullet Chart, Gauge Chart, Pie Chart, Sankey Chart, Master Item, Icon Bar and Waterfall.
There is an updated version of Viztips available. For more information, see Viztips Overview
This topic contains the following sections:
Examples
The tooltip shown when the cursor hovers over a field is based on the dimension. We've got some example layers here. Figure 1 shows the dimension Country within a table, Figure 2 shows the dimension Product Group within a bar chart.
Figure 1: Legacy Viztips Example Country
Figure 2: Legacy Viztips Example Product Group
Getting Started
To use Legacy Viztips, your Vizlib KPI Designer must be a master item. Each time you want to return a value related to the item you are hovering over, you can use the following type of expression. This works well for measures, and vl_viztipsSet is replaced by the value you've selected.
Measures
=sum( $(vl_viztipsSet) Sales)
So if you used Country as a value and hovered over USA, the expression here would show the Sales figures for the USA.
Best for Strings/Dimension
=maxstring( $(vl_viztipsSet) [Sales Person] )
Step-by-Step Tutorial
-
Open your app in Edit mode, create a Vizlib KPI Designer object, and choose a template or create your own (in the last step this created the variable, so we have something to work with).
Figure 3: KPI Designer Object
-
Enable Legacy Viztips in the property panel of your chosen chart.
Figure 4: Legacy Viztips Enabled
-
Add/write expressions to be used by Legacy Viztips (you can base them on the expressions we used in Getting Started).
Note: If you have already created a set analysis, please read through the section Using Legacy Viztips with Existing Set Analysis.
Figure 5: Add Expressions
-
Add the KPI Designer object as a master item.
Figure 6: Add to Master Items
-
Select the KPI Master item.
Figure 7: KPI Master Item
-
Hover over your chart dimension to see your Legacy Viztip.
Figure 8: Legacy Viztip Displayed on Hover
Using Legacy Viztips with Existing Set Analysis
If you have your own set analysis and want to work with Legacy Viztips, the type of formula we've below will work. Make sure this occurs in the set, but also note that the variable in use is different. If you've already applied a set analysis, you should use the vl_viztipsInlineSet variable in the expression here.
=Avg({$<[Month]={'Apr'} $(vl_viztipsInlineSet)>}[Amount])
Note: If you're using set analysis, you will need to apply the LegacyViztip variable of set analysis to the master item source chart as well as the KPI Designer.
Dynamic Labels for Legacy Viztip Tool-tips
You can support two different Legacy Viztips variables within a set analysis. We've set out a couple of examples in this section for you. Dimensions are named consecutively, based on the hierarchy they are displayed in, so simply use variable 01 first, then 02.
-
vl_viztipsFieldName01 - shows a string for the Field name hovered over
=subfield(subfield(vl_viztipsSet,'[',2),']',1)
-
vl_viztipsFieldValue01 - shows a string for the value being hovered over
=subfield(vl_viztipsSet,chr(39),2)
Limitations and Known Issues
-
When editing Vizlib KPI Designer master item objects used in Legacy Viztips, always try to refresh after making changes since some configurations may be cached. Some changes may be visible immediately, but this is dependent on Qlik Sense refresh settings, which may vary between versions.
-
Legacy Viztips applies to all measures shown within a chart - it cannot be configured per measure. Whilst Legacy Viztips is enabled, Custom HTML tooltips will be disabled.
-
When cloning apps with Legacy Viztips, users may need to expand the Legacy Viztips section of the property panel for it to be configured in a new app.
-
If Vizlib KPI Designer master item object in Legacy Viztips matches the object type inside the KPI layer, the sheet will render an infinite loop and will need to be removed.
-
If Legacy Viztips is added to the tooltip in specific sheet with Vizlib KPI Designer master item objects, and the visualization is removed, Legacy Viztips will still work within the removed visualization. The user should refresh the application or change the sheet to remove it.
-
When a master item object is removed, and the user opens a sheet where tooltip with this master item is selected, the visualization will not load as the master item object does not exist. The message Viz Tips visualization problem is returned.
-
Legacy Viztips is not supported where multiple objects on the sheet use the same master item and the master item object uses Legacy Viztips from another master item layer.
-
Legacy Viztips does not currently support calculated dimensions.