Create a new instance. Please note it does not take a name as parameter.
This is an async
callback.
It can be used for quite sophisticated purposes.
For example, the RemoteDataAdaptors can request data from a remote service based on
current filters and await till results are received.
From dc-v5, there is first-class support for data sources other than CrossFilter. The data provider specific behavior is extracted so that an alternate implementation will allow using different back-ends, including remote data sources.
It stores filter state of charts.
Redraw all the charts.
When a filter is modified for any of the charts or there is a change in the underlying data, all linked charts will need be redrawn.
It will do the following in order:
beforeRedrawAll
,redraw
on each of the charts,renderlet
.For any filter changes, this will be called by dc charts internally. However, if there is a change in data (like rows getting added), this function needs to be called to see the updated data.
Once all charts have been registered, this function should be called. It will do the following in order:
beforeRenderAll
,render
on each of the charts,renderlet
.Typically this will be called only once.
dc charts will deregister themselves.
Check if the chart is registered with this chartGroup.
List of charts in the group. It returns the internal storage without defensive cloning.
dc charts will register themselves. Non dc charts will need to call this method.
Generated using TypeDoc
A chart group often corresponds to a set of linked charts. For example, when using crossfilter, it is typically charts linked to same crossfilter instance. It specifies the set of charts which should be updated when a filter changes on one of the charts. The
BaseMixin
methodsrenderGroup
andredrawGroup
callrenderAll
andredrawAll
on the chart group.dc
charts created without specifying a chartGroup are registered with the default ChartGroup. It is recommended that alldc
charts are created with an explicit chartGroup.This has been introduced in v5 to facilitate automated garage collection of charts. SPAs (Single Page Applications), or any other environments where set of charts need to be unloaded, should use explicit chartGroups.
It is possible to register non dc charts (or any other object) with the chartGroup. Please see
IMinimalChart
to understand the methods the chartGroup will be invoking.dc
charts do not hard depend on this class. So, it is possible to replace it with any compliant implementation.IChartGroup
specifies what rest of thedc
expects.