dc.js – Listening for chart group render

The “right” way to do this is to register your chart in the dc registry with dc.registerChart

You just need to implement .redraw() and .render() on some object (your chart or a wrapper), and pass that object as the first argument.

Put it in the same group (second arg) as the charts it should respond to.

render() creates the dom elements from scratch, and redraw() updates them when the data changes.

Depending on how the chart is used, you may also have to implement .filterAll() and .anchorName()

Leave a Comment