question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

generalize & spin off the chart registry

See original GitHub issue

The proposal is to create a separate library (under this dc-js org or crossfilter org, though potentially it can be used without either), which takes care of the communication between charts that is currently handled by the undocumented (#676) dc.chartRegistry

It would probably use d3.dispatch (or a copy of it from the new modular d3 v4, since this has relevance without d3) to keep the array of listeners. So render and redraw become just events.

Also there are at least two common inter-chart events, various forms of brushing-and-linking that are not brushing-and filtering. One is just linked selection, where the charts have the same dimension or at least compatible dimensions (#681). The other is range/focus charts; in general there will be more than one focus chart (#820).

The more complicated idea is to abstract what a filter is, basically move dc.filters out from here, because many people use dc.js with a backend that is not crossfilter. Then there would be something that “renders” queries from those filters. (And we might hit #478 while we’re at it.)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gordonwoodhullcommented, Dec 3, 2018

I made half an attempt here: chart.registry.js.

It works okay but it is verbose. I came to the conclusion that d3.dispatch is probably too low-level a tool for this, since really we want a whole interface of methods (some of them optional) on each chart.

Maybe that is fine, since it would be better for the chart registry to be free of dependencies.

0reactions
kum-deepakcommented, Jan 7, 2021

Thanks @gordonwoodhull!

I agree with the not spinning off part.

Once upon a time (when porting to ES6) I was considering splitting the library into the core, base charts, and not commonly used charts into separate libraries. However, I started realizing that a significant number of users will trade simplicity even if the cost is a bigger bundle size. Users who care about smaller sizes can achieve the same by creating their own bundles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generalized spin mapping for quantum-classical dynamics
We recently derived a spin-mapping approach for treating the nonadiabatic dynamics of a two-level system in a classical environment [J. E. Runeson and...
Read more >
biohaven pharmaceutical holding company ltd. - SEC.gov
Dear Shareholder: I am pleased to report that the previously announced spin-off (which we refer to as the “Spin-Off”) by Biohaven Pharmaceutical Holding...
Read more >
dimensional chiral topological systems with SU(2) symmetry
We analyze numerical ES from systems with SU(2) symmetry including chiral spin-liquid ground states of local 2D Hamiltonians and two chiral ...
Read more >
Twist of generalized skyrmions and spin vortices in a polariton ...
Fig. 1. Generation of vortices. Polarization fields map in real space relating to skyrmion (A and B) and spin (D and E) vortices....
Read more >
Diffusion MRI Reconstruction in DSI Studio - Google Sites
4.1 Diffusion Tensor Imaging (DTI); 4.2 Generalized Q-sampling Imaging (GQI) ... the b-table using [Step T2 reconstruction][B-table][flip by] and turn off ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found