Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

qHyperCubeDef property for table options in Visualization API

I am working now on a project where it is needed to create and update visualization objects on the fly.

For creating objects, I use this function:

qlik.app.visualization.create(type, cols, options)

I don't use cols parameter for defining dimensions and measures. For this I use options parameter called qHyperCubeDef instead. I do this because of consistency - as I understood, you can't update cols for created object - you can only update options by using QVisualization method "setOptions". Many visualization types support setting qHyperCubeDef's qDimensions and qMeasures in options, for example:

barchart properties ‒ Qlik Sense

gauge properties ‒ Qlik Sense 

Unfortunately, you can't set qHyperCubeDef's qDimensions and qMeasures in options for table - table properties ‒ Qlik Sense

You can only set there something like textAlign or representation for qDimenstions.

My question is, am I missing something, or it is not possible to set or update qHyperCubeDef's qDimensions and qMeasures for created on the fly table object by using "setOptions"?

aklaaz

1 Reply
websy1985
Luminary Alumni
Luminary Alumni

You can achieve it using the "applyPatches" method on the model of the visualisation but it involves a lot of logic. It's probably quicker to just recreate the visualisation again with your new requirements using the Visualization API. As long as you clean up after yourself and use the close() function on any viz you want to destroy you should be ok.

I hope that helps

Nick