Skip to content

d3 partition: ability to choose different "value" size variable  #180

@aaron-613

Description

@aaron-613

I have a Sunburst where each node has multiple values associated with it (e.g. packets, bytes, leaves). The goal is to be able to tween between different sized arcs for the different types of data. Using custom functions and hierarchy.eachAfter() I can build summed versions of each of these values for the whole tree, and can then sort the hierarchy by whichever I want. But when running partition it requires Node.value to be populated. This means having an extra variable on each Node. Rather, it would be nice if I could somehow say: use d.data.bytesCount varable instead.

I guess, the ability to pass a custom function to a new value() method for partition, where the default is to return d.value but can be modified if required.

Thank you for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions