Skip to main content Skip to complementary content

paint method

paint($element, layout)

Method used to render the visualization. Will be called every time the visualization should be rendered, either because of new data from the server or because it has been re-sized.

Parameters

Name Description
$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 slection 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, please refer to the extension examples provided with your Qlik Sense installation. See Code examples.

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!