qlik-oss / enigma.js

JavaScript library for consuming Qlik's Associative Engine.
MIT License
210 stars 82 forks source link

How Might I use Visualizations? #472

Closed momja closed 6 years ago

momja commented 6 years ago

Description

Is there a way to make use of the visualizations API with enigma?

Steps to Reproduce

1.) I created a session App called app 2.) Try to use app.visualization.create()

Expected behavior

It would be desirable if this would create a visualization and then return it in a promise like the behavior described here. Maybe I am missusing this, but I think it would be useful to connect to the Visualization API

Actual behavior

Returns TypeError: Cannot read property 'create' of undefined

Environment

VSCode running in Chrome Browser

Library
[ X] Node.js
[ ] Browser
Operating system
[ X] Windows
[ ] OSX
[ ] Linux
Qlik Sense
[ X] Desktop
[ ] Enterprise

Versions

aihazm commented 6 years ago

Hi @momja,

The visualization API is part of the Qlik Sense client API's (capability API's qlik.js) and you will not be able to access it from the returned session App with enigma.js.

If you want to use it, you can instead create a session app with the capability API's => https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/Mashups/Content/Howtos/session-app-tutorial.htm

Alternatively, you can create visualizations with enigma.js & picasso.js see examples here => https://picassojs.com/examples.html

sublibra commented 6 years ago

Closing this issue as works as designed. Please comment and reopen if there is any question.