Sunbursts are a visual representation of two-dimensional hierarchical information in a circular model. Data is represented in size and color distinct from others based on their value. In the following example, the sunburst component is plotted using ojSunburst with the nodes assigned with data values:
- HTML:
<div id='sunburst-container'> <div data-bind="ojComponent: { component: 'ojSunburst', animationOnDisplay: 'auto', sizeLabel: 'Population', colorLabel: 'Median Household Income', nodeDefaults: {labelDisplay: 'rotated'}, nodes: nodeValues }" style="max-width:750px;width:100%; height:750px;"> </div> </div>
- JavaScript:
require(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojknockout', 'ojs/ojsunburst'], function(oj, ko, $) {