Skip to content

Commit

Permalink
Clone crossfilter results before passing on to the chart - highlights…
Browse files Browse the repository at this point in the history
… data not being updated correctly in BubbleOverlay
  • Loading branch information
kum-deepak committed Jun 10, 2020
1 parent 64716df commit ae21b7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/bubble-overlay-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ describe('dc.bubbleOverlay', () => {
});
});

function removeEmptyBins (grp) {
function cloneAndRemoveEmptyBins (grp) {
return {
all: function () {
return grp.all().filter(d => d.value !== 0);
return grp.all().map(d => Object.assign({}, d)).filter(d => d.value !== 0);
}
};
}
describe('filtering another dimension', () => {
let regionDim;
beforeEach(() => {
chart.group(removeEmptyBins(group)).render();
chart.group(cloneAndRemoveEmptyBins(group)).render();
regionDim = data.dimension(d => d.region);
});
function expectRadii (expected) {
Expand Down

0 comments on commit ae21b7a

Please sign in to comment.