fixing broken group bar chart (#10313)

* fixing broken group bar chart

* fixing test

* updating based on last review
This commit is contained in:
Peter Pisljar 2017-02-15 18:10:04 +01:00 committed by GitHub
parent 4c85fd4954
commit c3c8e55e4d
2 changed files with 11 additions and 2 deletions

View file

@ -69,8 +69,16 @@ dataTypesArray.forEach(function (dataType, i) {
});
});
it('should stack values', function () {
expect(isStacked).to.be(true);
it('should stack values when mode is stacked', function () {
if (mode === 'stacked') {
expect(isStacked).to.be(true);
}
});
it('should stack values when mode is percentage', function () {
if (mode === 'percentage') {
expect(isStacked).to.be(true);
}
});
});

View file

@ -141,6 +141,7 @@ export default function AxisConfigFactory() {
break;
case SCALE_MODES.GROUPED:
offset = 'group';
stacked = false;
break;
case SCALE_MODES.PERCENTAGE:
offset = 'expand';