react-zoomable-sunburst

0.0.5

Sunburst

Creates a zoomable Sunburst

new Sunburst(props: object)

Extends React.Component

Parameters
props (object)
Name Description
props.data object see the d3 flare.json data for the shape that is required.
props.width string width of svg
props.height string height of svg. If width and height are not the same there will be dead space.
props.count_member number what data element to use for slice size
props.radianCutoff number (default .01) smallest slice to show in radians
props.transitionDuration number (default 500) ms for animation
props.saturation number (default .5) base color saturation of slices
props.lightness number (default .5) base color lightness of slices
props.child_brightness number (default .5) value to lighten children slices
props.font_size number (default 12) for calculating if text fits
props.colorFunc func (default (node,current_color)=>current_color) Custom color func for slices with heights > 0.
props.labelFunc func? returns text to slice
props.condensedLabelFunc func? backup function to try to fit less text for smaller slices.
props.tooltipFunc func (default (data)=>data.name)
props.tooltipX number (default 20) x pointer offset to show tooltip
props.tooltipY number (default 20) y pionter offset to show tooltip
props.domID string? will be random if undefined
props.onMouseover func?
props.onMouseout func?
props.onClick func?
props.key_member string? data member to construct dom ids from
Instance Members
select(id)
updateColor()