One of my goals in doing presentations and classes on Qlik Sense APIs is to get people to see the “Art of the Possible” — that is, seeing what opportunities may exist in your organization to leverage the power of the associative engine and the Sense APIs, beyond the standard client and hub.
Today I’ll highlight a demo built by my colleague Nick Webster. This chart actually came out of a class when a student asked “could we…”.
This example uses a standard Qlik Sense table that shows Sales in both USD and Euro. The twist is that the Euro column is calculated dynamically using an exchange rate fetched from a web service.
http://websy.io/demos/aop1 (select “Live Currency” from menu)
This visualization appears in a web page, but the data and the visualization (optionally we shall see later) are in Qlik Sense.
The Euro column is the sales amount multiplied by a variable representing the Euro rate. The Measure is:
Sum([Sales Amount]) * $(vEurRate)
Every 20 seconds a JavaScript function in the webpage makes a call to a web service to get the current USD/Euro rate. The new rate is then assigned to the variable with a single API call:
app.variable.setNumValue("vEurRate", eurRate);
The chart will refresh with the new calculation. Do we have to do anything to get the updated values to display? No! The visualization is automatically refreshed. The API takes care of all the plumbing to detect the change and update the display.
Does this table viz need to appear in the Qlik Sense app? It may be created and maintained in the app , in which case it is inserted into the web page with a single line of code:
app.getObject("pageLocation","objectId");
Alternatively, you can create the entire table visualization using JavaScript code in the web page.
You have options for reuse of existing content and deciding where the code will reside. For example, leveraging the skills of the Qlik Devs for expression authoring and visualization creation. Or creating the visualization by using code only for tight integration with web development. Or splitting the work where the Qlik Team authors Master Measures in the app and the Web Team builds code generated visualizations that utilize those Measures.
On December 3-6 I will be teaching a “Web Development for Qlik Developers” class in Atlanta. In this four day class we’ll explore the “Art of the Possible” and get you enabled to begin implementing those possibilities as mashups and visualizations using the Qlik Sense APIs.
The class is geared to Qlik Sense Developers who have no prior experience coding web with web technologies. We’ll start by learning the basics of HTML, CSS and JavaScript as they apply to Sense. We’ll move on to reusing existing visualizations and create new visualizations from scratch, even using libraries beyond Qlik Sense. The class is full of hands on exercises and you’ll come away with your work as well as many samples.
Along the way we’ll look at the requirements and options for licensing and deployment, and integration with popular web frameworks like Angular and Bootstrap.
You can register for the class here. If you have any questions before registering, reach out to me on the Contact Form.
-Rob
Rob,
Just couldn’t fit my schedule to attend this wonderful opportunity 🙁
Are there any plans to conduct this class again in the near future in any of the other US cities.
Warm regards,
I don’t have one scheduled yet but have received a number of requests. Stay tuned and I’ll announce future dates on this blog as well as twitter @QVCookbook.
It was a great class this week!
Rob, the demo gives an error. (used Chrome browser):
An error occurred
Connection lost. Make sure that Qlik Sense is running properly. If your session has timed out due to inactivity, refresh to continue working.
Sometimes our demo server is down 🙂 Please try again, it appears to be working now.