Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Jarkijsvet
Contributor
Contributor

Bars in the barchart don't group

Hi friends!

I have a problem. I created barchart in my Mashup. It looks like this:

Jarkijsvet_3-1608206638132.png

But when i change

"barGrouping": {
"grouping": "grouped" ---> "stacked"
},

i get this one:

 

image.png

 

I want to get barchart like this:

image.png

My js-code:

app.visualization.create(
'barchart',
[
{
"qDef": {
"qFieldDefs": ["=Hour"],
"qFieldLabels":["Hour"]
},
"series": {
"type": "bar",
"axis": 0
},
},
{
"qDef": {

"qFieldDefs": ["FAILPASS"],
"qFieldLabels":["Fail/Pass"],
},
"series": {
"type": "bar",
"axis": 1
}
},
{
"qDef": {
"qLabel": 'Total',
"qDef": "=count(distinct ..........................) "
},
}
],

{
"showTitles": true,
"title": "Net scores",
"orientation": "vertical",
"scrollbar": "none","barGrouping": {
"grouping": "grouped"
},
"gridLine": {
"auto": false,
"spacing": 3
},
"dataPoint": {
"showLabels": true
},
"color": {
"auto": false,
"mode": "byExpression",
"colorExpression": barsColor,
"reverseScheme": false,
"autoMinMax": true,
"byMeasureDef": {
"label": "Count(NetScoreName)",
"key": "Count(NetScoreName)",
"type": "expression"
}
},
"legend": {
"show": false
},
"qHyperCubeDef": {
"qSuppressZero": false,
"qSuppressMissing": true,
},
}
).then(function(vis){
vis.show("QV04");
});

I tried a lot of different ideas (include  "qHyperCubeDef": { "qMode": "K" },) but have not got a result... Tell me please what i can do!

Labels (4)
0 Replies