Skip to content

Commit

Permalink
Merge pull request #178 from redbearsam/fix/sunburst-zero
Browse files Browse the repository at this point in the history
Treat negative sunburst size values as zero
  • Loading branch information
Ro4052 authored Apr 18, 2019
2 parents 041ed9b + bd4c116 commit bd39ee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/perspective-viewer-d3fc/src/js/data/treeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function treeData(settings) {
if (i === groups.length - 1) {
element.name = groups.slice(-1)[0];
if (groups.length === settings.crossValues.length) {
element.size = getDataValue(d, settings.mainValues[0], split);
const size = getDataValue(d, settings.mainValues[0], split);
element.size = size > 0 ? size : 0;
}
}
currentLevel = element.children;
Expand Down

0 comments on commit bd39ee2

Please sign in to comment.