Class: sunburstChart

dc. sunburstChart


new sunburstChart(parent [, chartGroup])

The sunburst chart implementation is usually used to visualize a small tree distribution. The sunburst chart uses keyAccessor to determine the slices, and valueAccessor to calculate the size of each slice relative to the sum of all values. Slices are ordered by ordering which defaults to sorting by key.

The keys used in the sunburst chart should be arrays, representing paths in the tree.

When filtering, the sunburst chart creates instances of HierarchyFilter.

Parameters:
Name Type Argument Description
parent String | node | d3.selection

Any valid d3 single selector specifying a dom block element such as a div; or a dom element or d3 selection.

chartGroup String <optional>

The name of the chart group this chart instance should be placed in. Interaction with a chart will only trigger events and redraws within the chart's group.

Mixes In:
Source:
Returns:
Type
dc.sunburstChart
Example
// create a sunburst chart under #chart-container1 element using the default global chart group
var chart1 = dc.sunburstChart('#chart-container1');
// create a sunburst chart under #chart-container2 element using chart group A
var chart2 = dc.sunburstChart('#chart-container2', 'chartGroupA');

Methods


cx( [cx])

Get or set center x coordinate position. Default is center of svg.

Parameters:
Name Type Argument Description
cx Number <optional>
Source:
Returns:
Type
Number | dc.sunburstChart

cy( [cy])

Get or set center y coordinate position. Default is center of svg.

Parameters:
Name Type Argument Description
cy Number <optional>
Source:
Returns:
Type
Number | dc.sunburstChart

emptyTitle( [title])

Title to use for the only slice when there is no data.

Parameters:
Name Type Argument Description
title String <optional>
Source:
Returns:
Type
String | dc.sunburstChart

externalLabels( [externalLabelRadius])

Position slice labels offset from the outer edge of the chart.

The argument specifies the extra radius to be added for slice labels.

Parameters:
Name Type Argument Description
externalLabelRadius Number <optional>
Source:
Returns:
Type
Number | dc.sunburstChart

innerRadius( [innerRadius])

Get or set the inner radius of the sunburst chart. If the inner radius is greater than 0px then the sunburst chart will be rendered as a doughnut chart. Default inner radius is 0px.

Parameters:
Name Type Argument Default Description
innerRadius Number <optional>
0
Source:
Returns:
Type
Number | dc.sunburstChart

minAngleForLabel( [minAngleForLabel])

Get or set the minimal slice angle for label rendering. Any slice with a smaller angle will not display a slice label.

Parameters:
Name Type Argument Default Description
minAngleForLabel Number <optional>
0.5
Source:
Returns:
Type
Number | dc.sunburstChart

radius( [radius])

Get or set the outer radius. If the radius is not set, it will be half of the minimum of the chart width and height.

Parameters:
Name Type Argument Description
radius Number <optional>
Source:
Returns:
Type
Number | dc.sunburstChart