3 ms·
> Common API for getting and setting accessor functions. This is a really good idea, and it solves the issue of coupling commonly see in d3.js examples, where
by paradite 10y ago
> Common API for getting and setting accessor functions.
This is a really good idea, and it solves the issue of coupling commonly see in d3.js examples, where the chart needs to know about the keys (properties) of the data.
I usually write accessor functions as part of my model to avoid this coupling but letting the chart component take in accessor is clearly a better approach.
- tomgp 10y agoyeah, this is the bit I liked. Personal taste: I'd prefer to see this implemented without extending a base class i.e. by composition rather than inheritance, seems more d3-ish to me.