A mashup is a web page consisting of content from more than one source displayed in a single user interface. When we design mashups in Qlik Sense, we integrate multiple random objects from a Qlik Sense application into a predefined layout. In doing so, we use the active content from the Qlik Sense application. Hence, the visualizations get updated automatically when the state of the object changes.
The Mashup editor in Qlik Dev Hub allows us to build mashups using the Mashups API. These Mashup APIs are used to display Qlik Sense objects on a website or web application where one can interact with the Qlik Sense datasets.
We make use of the Automotive .qvf
application for this recipe. This application comes with the default installation of Qlik Sense. If not, it is available for download from the Packt Publishing website. Before starting the Qlik Dev Hub editor, make sure you have the Qlik Sense Desktop running in the background.
http://localhost:4848/dev-hub
QlikDevHub_Mashup
..html
and .js
. The Qlik Sense content is stored in the .html
file, while the .js
script file contains the code for the mashups. The right-hand side pane gives options to add Lists and Hypercubes to the mashup:Automotive.qvf
application from the dropdown. Once selected, objects within the application will be displayed.Automotive.qvf
, the JavaScript in the QlikDevHub_Mashup.js
file gets updated as the following. Every new application opened will add a new line in the open apps section:QlikDevHub_Mashup.html
page gets updated. By taking a look at the tab, we can see that the code looks like this:We can also add lists to the Qlik Sense application using the list builder. The lists are not a part of the Qlik Sense application our mashup is connected to. Along with the lists, we can also add a Hypercube with specified dimensions and measures to further enhance our mashups.
Both the options can be found on the right-hand side panel of the Mashup editor window.