Closed stockiNail closed 1 year ago
How about just allowing an array as key
?
And internally, just make it always be an array, so the calculation is cleaner.
Just a thought, does not have to be that way.
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. Personally I dont like this convention based on the position of an element in an array. I will have a look anyway next week if is not urgent
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.
Maybe sumKeys would be better name for it? Or additionalSumKeys.
Done, in sumKeys
.
The "position 1" convention can be kept internal and should only be used if the code is cleaner that way.
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.
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 invs
key as object, where the keys are the same thatsumKeys
option has provided.TODO