Skip to content

Commit defd85e

Browse files
committed
Merge branch 'release/1.2.0'
2 parents a4008e0 + 40fc1ae commit defd85e

16 files changed

+2236
-140
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,35 @@ The options object is an optional parameter and allows to override the default v
8686
* `countAccessor`: Function that returns the value associated with the node. Is called with a node as parameter. By default, the value of `node.data.self_count` is used.
8787
* `getLevel`: Function that returns the depth of a node (used for determining the color). Is called with a node as parameter. By default the actual depth is used.
8888
* `rerootCallback`: Function that gets called after every "reroot" of the visualization. Is called with a node as parameter. By default, this is empty.
89+
90+
91+
## Sunburst
92+
93+
### The data object
94+
The data object is a hierarchical Node object. It consists out of:
95+
* `id`: A way to uniquely identify the node
96+
* `name`: The name of the node
97+
* `data`: An object containing additional data of choice
98+
* `children` (optional): An array containing one or more node objects that are the children of the current object
99+
100+
### The options object
101+
The options object is an optional parameter and allows to override the default visualization settings.
102+
103+
#### Values
104+
* `height` (default: 600): The height in pixels of the visualization.
105+
* `width` (default: 600): The width in pixels of the visualization.
106+
* `breadcrumbWidth` (default: 200): The width of the breadcrumb bar.
107+
* `radius` (default: 300): The radius of a single slice.
108+
* `className` (default: `unipept-sunburst`): The class added to the visualization. Used for styling.
109+
* `levels` (default: 4): The maximum depth of the data object. By default the actual depth is used.
110+
* `duration` (default: 1000): The duration of the animations in ms.
111+
* `useFixedColors` (default: false): Base colors on the name of the nodes.
112+
* `enableTooltips` (default: true): Should tooltips be shown on mouseover?
113+
114+
#### Functions
115+
* `getLabel`: Function that returns a string to use as label for a node. Is called with a node as parameter. By default, the `name` attribute of the node is used.
116+
* `getTooltip`: Function that returns the html to use as tooltip for a node. Is called with a node as parameter. By default, the result of `getTooltipTitle` is used in a header tag and the result of `getTooltipText` is used in a paragraph tag.
117+
* `getTooltipTitle`: Function that returns the text to use as tooltip title. Is called with a node as parameter. By default, the `name` attribute of the node is used.
118+
* `getTooltipText`: Function that returns the text to use as tooltip text. Is called with a node as parameter. By default, the value of `data.count` the node is used.
119+
* `countAccessor`: Function that returns the value associated with the node. Is called with a node as parameter. By default, the value of `node.data.self_count` is used.
120+
* `rerootCallback`: Function that gets called after every "reroot" of the visualization. Is called with a node as parameter. By default, this is empty.

0 commit comments

Comments
 (0)