-
Notifications
You must be signed in to change notification settings - Fork 35
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
Enable sumKeys option to sum more than one key when data are grouped #144
Conversation
Conflicts: src/controller.js src/squarify.js test/specs/squarify.spec.js
Conflicts: src/controller.js src/squarify.js test/specs/squarify.spec.js
How about just allowing an array as |
I thought to use ah array but in this case we must assume the first element of the array is the key to use for grouping and drawing. |
The "position 1" convention can be kept internal and should only be used if the code is cleaner that way. Maybe sumKeys would be better name for it? Or additionalSumKeys. |
Conflicts: test/fixtures/events/hoverCaptions.js
Done, in |
Let me review better the code in order to merge key and sumKeys in an array (and then arguments for all other functions which are receiving that). EDIT: apologize but I need more time to do something "good" enough" ;) |
@kurkle when you have time, can you have a look if sounds better now? PR is still in draft. |
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.
Yeah, this way looks good to me!
Co-authored-by: Jukka Kurkela <[email protected]>
Fix #47
New
sumKeys
option could be an array of keys of the objects used in tree and consumed grouping the data.The result of sums of these additional keys will be stored in data object in
vs
key as object, where the keys are the same thatsumKeys
option has provided.TODO