Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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
Highlighted
Creator
Creator

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

does QV11 has fixed height/width ?

Highlighted
Contributor
Contributor

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. 

Highlighted
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?

Highlighted
Partner
Partner

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

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. 

Highlighted
Partner
Partner

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