Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Thomas91
Contributor II
Contributor II

Qlik Sense Mashup - Stacked Bar Chart (qHyperCubeDef - qMode)

Hey everyone, 

I'm looking for help/advice/expertise if possible. 

I'm currently developing a mashup and I'm trying to present a bar chart in a stacked format however I can not for some reason get the object to render correctly. 

Code I'm using is below;

app1.visualization.create(
'barchart',
[
{
"qDef": {
"qFieldDefs": [
"=Dual(MonthYear, MonthStart(CalendarDate))"
],
"qFieldLabels": ["Year"],
"qSortCriterias": [
{
"qSortByNumeric": 1
}
],
"autoSort": false
}
},
{
"qDef": {
"qFieldDefs": [
"Incident: Priority"
],
"qFieldLabels": [
"Priority"
]
}
},
{
"qDef":{
"qDef": "=$(vServiceDeskCallsRolling13)",
"qLabel": "Number of Calls (by Start Month)"
}
}
],
{
"showTitles": true,
"title": "Call per Month",
"showDetails": false,
"qHyperCubeDef": {
"qMode": "K"
},
"barGrouping": {
"grouping": "stacked"
}
}
).then(function(vis){
vis.show("QV11",{"noInteraction": true});
});

Does anybody have any ideas?

Thank you. 

Labels (2)
6 Replies
oz_moyal
Creator
Creator

Is this issue specific to this object ?
are u able to produce other objects ?

does QV11 has fixed height/width ?

Thomas91
Contributor II
Contributor II
Author

Hi! 

I am able to produce other objects. I am able to produce a bar chart and a grouped bar chart but I am not able to change the grouping to "stacked". All this is with object "QV11".

QV11's height is set to 350px within the html styling.  

I am using grid within the CSS styling. 

Deny12
Contributor
Contributor

Hi, 

Were you able to get the stacked bar properly?

I am also trying to develop stacked bar graphs and 

{
"qHyperCubeDef": {
"qMode": "K"
},
"barGrouping": {
"grouping": "stacked"
}
}

does not seem to be working but grouped and basic bar graphs work fine. 

Could anyone help me out please if you have got this?

sullivlo
Partner - Contributor
Partner - Contributor

"qHyperCubeDef": {
     "qMode": "K",
     "qAlwaysFullyExpanded": true
},
"barGrouping": {
     "grouping": "stacked"
}
briwilli
Contributor III
Contributor III

Thanks Sullivlo, I was facing the same problem and your response resolved my issue after spending a number of hour trying different settings.  The official documentation that I reviewed never mentioned requiring the qAlwaysFullyExpanded property. Curious, how did you discover this solution?  Thanks again. 

sullivlo
Partner - Contributor
Partner - Contributor

I looked at the json output of a working stacked bar chart that I built in the app then pulled into the mashup using the chrome extension add sense