Skip to content

Commit

Permalink
Suppress missing values and use correct cube size
Browse files Browse the repository at this point in the history
Issue: DEB-244
  • Loading branch information
Albert Backenhof authored and Albert Backenhof committed May 29, 2019
1 parent 79339a8 commit 4fab3b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ function createCube (definition, app) {
});
}

async function buildDataCube (originCubeDefinition, hasTwoDimensions, app) {
async function buildDataCube (originCubeDefinition, originCube, app) {
const cubeDefinition = {
...originCubeDefinition,
qInitialDataFetch: [
{
qHeight: 1000,
qWidth: 10
qHeight: originCube.qSize.qcy,
qWidth: originCube.qSize.qcx
}
],
qDimensions: [originCubeDefinition.qDimensions[0]],
qMeasures: originCubeDefinition.qMeasures
};
if (hasTwoDimensions) {
if (originCube.qDimensionInfo.length === 2) {
cubeDefinition.qDimensions.push(originCubeDefinition.qDimensions[1]);
}
const cube = await createCube(cubeDefinition, app);
Expand All @@ -41,7 +41,7 @@ export async function initializeDataCube (component, layout) {
: properties.qHyperCubeDef;
hyperCubeDef.qStateName = layout.qStateName || "";

return buildDataCube(hyperCubeDef, layout.qHyperCube.qDimensionInfo.length === 2, app);
return buildDataCube(hyperCubeDef, layout.qHyperCube, app);
}

export function initializeDesignList (component, layout) {
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export default {
qWidth: 10
}
],
qMeasures: []
qMeasures: [],
qSuppressMissing: true,
qSuppressZero: false
}
},
support: {
Expand Down

0 comments on commit 4fab3b5

Please sign in to comment.