create method

This API is reliable and breaking changes are unlikely., cols, options)

Create a new visualization on the fly based on a session object and will not be persisted in the app.

Version history

Introduced 2.2


Name Type Description
type String

Visualization type. Can be:

  • barchart
  • boxplot
  • combochart
  • distributionplot
  • gauge
  • histogram
  • kpi
  • linechart
  • piechart
  • pivot-table
  • scatterplot
  • table
  • treemap
  • extension
cols Array


Column definitions, dimensions and measures. Each entry can be of the following structures:

  • String
  • NxDimension
  • NxMeasure

If the NxDimension or the NxMeasure refer to a library dimension or a library measure, you also need to add qType : "measure" or "dimension".

Columns for details and examples.

options Object


Options to set.

Options for all the properties that can be set for each visualization type


A promise of a QVisualization.


Example: Creating a barchart on the fly

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.visualization.create('barchart',["Case Owner Group","=Avg([Case Duration Time])"],{title:"Great on-the-fly barchart"}).then(function(bar){'QV04');

Example: Creating a toolbar using an extension.


See also:


Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?