Skip to content

Commit

Permalink
Merge pull request #152 from redbearsam/develop
Browse files Browse the repository at this point in the history
Allow for 2-column display when only 2 charts (#151)
  • Loading branch information
matt-hooper authored Apr 2, 2019
2 parents b7d3f82 + 8955dc0 commit fa05036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/src/js/charts/sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function sunburst(container, settings) {
const {width: containerWidth, height: containerHeight} = container.node().getBoundingClientRect();

const minSize = 500;
const cols = sunburstData.length === 1 ? 1 : Math.floor(containerWidth / minSize);
const cols = Math.min(sunburstData.length, Math.floor(containerWidth / minSize));
const rows = Math.ceil(sunburstData.length / cols);
const containerSize = {
width: containerWidth / cols,
Expand Down

0 comments on commit fa05036

Please sign in to comment.