Repository navigation
c3 2.0.2 makes hierarchy() give the same colors in JavaScript and Python, and throws clear errors on flows that aren't finite (#12).
Hierarchy colors
- Same child colors in both packages. Children are placed by farthest point sampling, where many candidates are exactly as far apart. Rounding in
Math.hypotandmath.hypotused to decide those ties, so modules with many children got different colors in JavaScript and Python. Ties now break the same way in both. - Some colors change. The old tie-breaking was arbitrary, so in both packages, hierarchies with many children per module get some new child colors, and so do the subtrees below them. Hierarchies with at most about 20 children per module rarely change.
Errors
hierarchy()throwsFlow must be finite, got Infinity for module [1]for a flow that isInfinity,-InfinityorNaN, instead ofInvalid color: #NaNNaNNaNin JavaScript and black in Python.hierarchy()throwsInvalid path: [1, NaN]for NaN in a path.palette()with weights throwsWeights must be finitefor a weight that isn't finite, instead of returning#NaNNaNNaN.- A
NaNflow or weight used to count as zero, and now throws.
In JavaScript these are RangeErrors, in Python ValueErrors.