dc-js/dc.js

Tip: make dataTable.columns accept object path

lgrkvst opened this issue · 0 comments

Unsure if the project has found any active maintainers. In the meantime, if you like me are looking for a way to make dataTable.columns accept path into deep objects (e.g. info.address.zip), here's a way:

Change d[v] on this line:

(typeof v === 'string') ? d[v] : // v is field name string

into:

v.split(".").reduce((o, i) => o[i], d)