Skip to content

Instantly share code, notes, and snippets.

@erikwett
Created March 10, 2016 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikwett/757cad141c1e39aa2e6e to your computer and use it in GitHub Desktop.
Save erikwett/757cad141c1e39aa2e6e to your computer and use it in GitHub Desktop.
Create chart with top values using Qlik Sense visualization API
app.visualization.create( 'barchart',
[{
qDef: {qFieldDefs: ["Case Owner Group"]}, //dimension field
qOtherTotalSpec: {qOtherMode: "OTHER_COUNTED", qOtherCounted: "5"} //top 5 values
},
"=Avg([Case Duration Time])"], //measure
{"title": "On the fly chart"}
).then( function ( barchart ) {
barchart.show( 'QV01' );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment