-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise hierarchy referencing and fixup parent percentage at the root node of treemap and sunburst #4219
Conversation
- simplify sunburst and treemap percentage references - add hovertemplate tests to treemap - fixup sunburst jasmine texttemplate tests
…here after merging the treemap PR
test/jasmine/tests/sunburst_test.js
Outdated
@@ -1345,7 +1345,7 @@ describe('Test sunburst texttemplate without `values` should work at root level: | |||
['path: %{currentPath}', ['path: /', 'path: Eve/', 'path: Eve/', 'path: Eve/', 'path: Eve/', 'path: Eve', 'path: Eve/Seth', 'path: Eve/Seth/', 'path: Eve/Awan/']], | |||
['%{percentRoot} of %{root}', ['100% of Eve', '33% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve']], | |||
['%{percentEntry} of %{entry}', ['100% of Eve', '33% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve']], | |||
['%{percentParent} of %{parent}', ['%{percentParent} of %{parent}', '100% of Seth', '33% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '50% of Seth', '100% of Awan']], | |||
['%{percentParent} of %{parent}', ['100% of Eve', '100% of Seth', '33% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '17% of Eve', '50% of Seth', '100% of Awan']], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait. Is this the root
node sector? You're saying the parent of the root node is itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Fixed in 54360be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it. After 54360be, looks like %{parent}
is now ''
, but %{percentParent}
is still 100%
for the root node.
Can we have '%{percentParent} of %{parent}'
resolve as '%{percentParent} of %{parent}'
for the root node (i.e. the percentParent
and parent
keys are not defined) like before?
I know this is not ideal, but I don't like filling in '%{percentParent}
and %{parent}
with wrong values for the root node just to make the template string look better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 7155917.
Nicely done 💃 thanks!! |
This PR
sunburst
andtreemap
plotshovertemplate
at different levels@etpinard