Skip to main content Skip to complementary content

paint method

Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

paint($element, layout)

Renders the visualization extension. Call this method when the visualization extension must be rendered, either because of new data from the server or because the visualization extension has been resized.

Version history

Version history
Version state Details
Introduced 1.0

Parameters

$element

jQuery wrapper containing the HTML element where visualization should be rendered.

layout

Data and properties for the visualization.

layout.qHyperCube.qDimensionInfo

An array with data about the dimensions used. Includes qFallbackTitle, the title and qCardinal, number of different values.

layout.qHyperCube.qMeasureInfo

An array with data about the measures used. Includes qFallbackTitle, the title, qCardinal, number of different values, qMin and qMax for minimum and maximum values.

layout.qHyperCube.qDataPages[0].qMatrix

An array with data from Qlik Sense. Every object corresponds to a row in the result. Dimension and measure values are JavaScript objects in this array.

layout.qHyperCube.qDataPages[0].qMatrix[0..#dimensions – 1]

Dimension values for the result row. Every object holds a text,(qText) to use for rendering, and a value(qElemNumber), to use for making selections, and the value state (qState).

layout.qHyperCube.qDataPages[0].qMatrix[#dimensions..]

An array with measure values for the result row. Every object holds data, the actual value(qNum), and text(qText), a formatted value.

layout.qHyperCube.qSize

The total number of rows (qcy) and columns (qcx) in the result set.

layout.qInfo.qId

An unique identifier for the object. Useful for generating a unique HTML ID if needed.

layout.qSelectionInfo

If the user is in selection mode this will be an object with two flags: qInSelections and qMadeSelections.

Example

paint: function ($element) {
	$element.html( "Hello world!!" );
}
Tip noteFor more examples of paint method implementation, refer to the extension examples provided with your Qlik Sense installation.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!