File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ exports.getVal = function(d) {
6060} ;
6161
6262exports . isHierarchyRoot = function ( pt ) {
63- return pt . data . data . pid === '' ;
63+ return getParentId ( pt ) === '' ;
6464} ;
6565
6666exports . setSliceCursor = function ( sliceTop , gd , opts ) {
@@ -148,13 +148,12 @@ exports.isHeader = function(pt, trace) { // it is only used in treemap.
148148} ;
149149
150150function getParentId ( pt ) {
151- var parent = pt . data . parent ;
152- return parent ? parent . data . id : undefined ;
151+ return pt . data . data . pid ;
153152}
154153
155154exports . getParent = function ( hierarchy , pt ) {
156155 var parentId = getParentId ( pt ) ;
157- return parentId === undefined ?
156+ return parentId === '' ?
158157 undefined :
159158 exports . findEntryWithLevel ( hierarchy , parentId ) ;
160159} ;
You can’t perform that action at this time.
0 commit comments