Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
einmalistkeinmal
Contributor
Contributor

Filter dimension when creating visualization on the fly

Hi, 

I'm trying to create a chart on the fly using the Visualization API and embed it on my web app. I'm  following the example here: Visualization API on the Fly and using the movie dataset as presented here as test case.

The code snippet below will create a chart showing the revenue per title (movie). This works as expected. However, I want to have additional control to automatically filter only specific titles. For example, I just want to see the revenue for the movie Avatar, and not the revenue for all the movies in the dataset. 

Any ideas how this is done?

 

app.visualization.create(
  'barchart',
  [
    "title",
    "=Sum(revenue)",
  ],
  {
    "showTitles": true,
    "title": "Net scores"
  }
).then(function(vis){
  vis.show("QV02");
});

 

 
Labels (4)
0 Replies