Closed gordonwoodhull closed 7 years ago
Checkbox the permalinks to these lines in today's develop branch:
fixed in #1032
these are harmless but the selectAll
of g.rows
and g.cols
above them is misleading - makes them look like a grouped selection when really it's just a simple axis-like g
containing them. can be fixed without creating more tests. fixed in 0260b13
This chart uses a non-standard data model, so these uses, although they look suspicious, actually work in the presence of data not updated in place. This is because the join is only between the map data and the elements, not between the crossfilter(ish) data and the elements. Instead the crossfilter data is read separately from its own array.
In fact, selectAll
may be wanted in order not to rebind anything, because it should stay bound to the map.
I'm uncomfortable with this data model, and think that the crossfilter data should probably be bound with the map data before both are bound with the svg elements. This is the problem that causes it to be hard to e.g. add d3.tip support to the choropleth, because the crossfilter(ish) data is hidden. But I don't propose to fix that atm.
I also note that while #719 is a complete rewrite, and avoids some d3.select
confusion through a lot of d3.select(x.parentNode).datum()
, it still has the parallel data.
So this selectAll
does not rebind data but it uses the parallel data[]
instead:
These ones look like they are selecting a single item but they are actually selecting all regions, and again the use of selectAll
is probably intentional because the map is the only bound data:
layerSelector
as wellI've verified with a bunch of new tests in aa27858 that the chart is not relying on data being modified in-place.
overkill, ugly way to update a title but probably harmless. unfortunate to remove titles in order to update them, but the alternative is a very messy join on an array of one element and an explicit data carry-through. (the "add if not there" pattern is pretty gross if you're trying to pass data through from a previous selectAll
.)
misleading as above
these can be fixed without writing new tests.
overkill as above
can be fixed without writing new tests.
line chart and row chart messiness fixed in f7e0a47
in 2.0
@mtraynham commented in https://github.com/dc-js/dc.js/pull/1032#issuecomment-155966554
Verify that all the heatmap and bubble chart/mixin ones are fixed by #1032 / #1237. Track down the rest of them, create failing tests, and verify fixes for them.