Global

Members


<constant> chartRegistry

The chartRegistry object maintains sets of all instantiated dc.js charts under named groups and the default group. See ChartRegistry for its methods.

Source:

<constant> config

General configuration object; see Config for members.

Source:

<constant> d3compat

d3.js compatiblity layer

Source:

Methods


deregisterAllCharts(group)

Clear given group if one is provided, otherwise clears all groups.

Parameters:
Name Type Description
group String

Group name

Source:
Returns:
Type
undefined

deregisterChart(chart [, group])

Remove given chart instance from the given group, creating the group if necessary. If no group is provided, the default group constants.DEFAULT_CHART_GROUP will be used.

Parameters:
Name Type Argument Description
chart Object

dc.js chart instance

group String <optional>

Group name

Source:
Returns:
Type
undefined

filterAll( [group])

Clear all filters on all charts within the given chart group. If the chart group is not given then only charts that belong to the default chart group will be reset.

Parameters:
Name Type Argument Description
group String <optional>
Source:
Returns:
Type
undefined

hasChart(chart)

Determine if a given chart instance resides in any group in the registry.

Parameters:
Name Type Description
chart Object

dc.js chart instance

Source:
Returns:
Type
Boolean

pluck(n [, f])

Returns a function that given a string property name, can be used to pluck the property off an object. A function can be passed as the second argument to also alter the data being returned.

This can be a useful shorthand method to create accessor functions.

Parameters:
Name Type Argument Description
n String
f function <optional>
Source:
Returns:
Type
function
Examples
var xPluck = pluck('x');
var objA = {x: 1};
xPluck(objA) // 1
var xPosition = pluck('x', function (x, i) {
    // `this` is the original datum,
    // `x` is the x property of the datum,
    // `i` is the position in the array
    return this.radius + x;
});
selectAll('.circle').data(...).x(xPosition);

redrawAll( [group])

Redraw all charts belong to the given chart group. If the chart group is not given then only charts that belong to the default chart group will be re-drawn. Redraw is different from re-render since when redrawing dc tries to update the graphic incrementally, using transitions, instead of starting from scratch.

Parameters:
Name Type Argument Description
group String <optional>
Source:
Returns:
Type
undefined

refocusAll( [group])

Reset zoom level / focus on all charts that belong to the given chart group. If the chart group is not given then only charts that belong to the default chart group will be reset.

Parameters:
Name Type Argument Description
group String <optional>
Source:
Returns:
Type
undefined

registerChart(chart [, group])

Add given chart instance to the given group, creating the group if necessary. If no group is provided, the default group constants.DEFAULT_CHART_GROUP will be used.

Parameters:
Name Type Argument Description
chart Object

dc.js chart instance

group String <optional>

Group name

Source:
Returns:
Type
undefined

renderAll( [group])

Re-render all charts belong to the given chart group. If the chart group is not given then only charts that belong to the default chart group will be re-rendered.

Parameters:
Name Type Argument Description
group String <optional>
Source:
Returns:
Type
undefined

transition(selection [, duration] [, delay] [, name])

Start a transition on a selection if transitions are globally enabled (disableTransitions is false) and the duration is greater than zero; otherwise return the selection. Since most operations are the same on a d3 selection and a d3 transition, this allows a common code path for both cases.

Parameters:
Name Type Argument Default Description
selection d3.selection

the selection to be transitioned

duration Number | function <optional>
250

the duration of the transition in milliseconds, a function returning the duration, or 0 for no transition

delay Number | function <optional>

the delay of the transition in milliseconds, or a function returning the delay, or 0 for no delay

name String <optional>

the name of the transition (if concurrent transitions on the same elements are needed)

Source:
Returns:
Type
d3.transition | d3.selection