Skip to content

Commit

Permalink
adapt ordinal bar example for d3@6 event changes
Browse files Browse the repository at this point in the history
fixes #1826
  • Loading branch information
gordonwoodhull committed Apr 8, 2021
1 parent 74d2c58 commit 4f0a43d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web-src/examples/focus-ordinal-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@
}
};
focus.on('pretransition', function(chart) {
chart.selectAll('rect.bar').on('click.ordinal-select', function(d) {
chart.selectAll('rect.bar').on('click.ordinal-select', dc.d3compat.eventHandler(function(d) {
var i = focusFilter.indexOf(d.data.key);
if(i >= 0)
focusFilter.splice(i, 1);
else
focusFilter.push(d.data.key);
chart.applyFilter();
chart.redrawGroup();
});
}));
});

focus.on('preRedraw', function(chart) {
Expand Down

0 comments on commit 4f0a43d

Please sign in to comment.