Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
_jespers_
Partner - Creator II
Partner - Creator II

Column width in pivot created as a visualization on the fly

I'm having a problem with the column width for a pivot table created as a visualization on the fly. The same problem also occurs when I'm creating the pivot table with the standard Qlik Sense pivot table chart, but my guess was that I could have more control over how the data was being displayed if I created the pivot table as an extension. 

In the pivot table I have the dimensions Date and ID to the left and the dimension Question and the measure Answers to the right. The problem is that the dimension Question is only displaying 1 question at the time, so I need to scroll to the right to see the rest of the questions.

How I want it to behave is that multiple questions is being displayed next to each other so I don't have to scroll to the right.

There is a property called columnWidths (link) that you can set in the qHyperCubeDef, but I don't get it to work and I'm actually not even sure what it does or if it will solve my problem.

Any ideas how I can get this to work or how I can achieve multiple questions, side by side?

Pivot table issue.png

 

app.visualization.create(
  'pivot-table',
  [
    'Date',
    'ID',
    'Question',
    '=Only(Answers)'
  ],
  {
    "showTitles": true,
    "title": "Example",
    "qHyperCubeDef": {
    	qNoOfLeftDims: 2,
    	qAlwaysFullyExpanded: true
    }
  }
).then(function(vis){
  	vis.show("QV01");
});

 

Thank you!

Labels (3)
1 Reply
linnakry
Partner - Contributor III
Partner - Contributor III

I have not tried with pivot-table, but for straight table, you can include columnWidths properties in the qHyperCubeDef, 

 

...,
  {
    "showTitles": true,
    "title": "Example",
    "qHyperCubeDef": {
    	"qNoOfLeftDims": 2,
    	"qAlwaysFullyExpanded": true,
        "columnWidths":[100,100, 100, 100]
    }
  }
...