diff --git a/Changelog.md b/Changelog.md index db49565eb..475c02f09 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +## 3.0.0 alpha 12 +* fadeDeselectedArea checks if brushing is enabled for the chart. Restores backward compatibility. By Deepak Kumar. ([#1422](https://github.com/dc-js/dc.js/pull/1422)) + ## 3.0.0 alpha 11 * xAxisPaddingUnit should be the d3 interval not the name of it ([#1320](https://github.com/dc-js/dc.js/issues/1320), [#1326](https://github.com/dc-js/dc.js/issues/1326), [#1420](https://github.com/dc-js/dc.js/issues/1420)) diff --git a/D3v4-Upgrade-Notes.md b/D3v4-Upgrade-Notes.md deleted file mode 100644 index 6f015bc44..000000000 --- a/D3v4-Upgrade-Notes.md +++ /dev/null @@ -1,44 +0,0 @@ -##Non working examples - -- http://localhost:8888/web/examples/filter-stacks.html - (fading is peculiar) -- http://localhost:8888/web/zoom/restrict-panning.html - Need to increase height of range chart - currently height of - brushable area is zero. New implementation needs it be more than zero. -- http://localhost:8888/web/ - Range brushing inconsistent with previous version - If the range chart is brushed first it works correctly - If the Focus chart is zoomed first, brushing range chart fails. - - -##Issues to be fixed - -- Peculiar fading in filter-stacks.html (Medium) - - -##Before release - -- All High priority issues -- Possibly Medium priority issues -- Prepare upgrade guide (Initial version ready) - - -### Next set of pull requests - -- Cleanup of zoom behavior. Testing of restrict panning etc. -- dc.event.trigger -- exit/enter/update sequence -- Additional test cases for dc.util.add and dc.util.subtract -- One for each new chart type - original PRs from community -- Consider removing transitions for zooming and brushing -- d3 stack to D3v4 -- Changing .tension call in lineChart - - -### For end users - -- Changes to `xUnits` interface. -- geoChart -- Color scheme -- tension in curves - diff --git a/src/bar-chart.js b/src/bar-chart.js index 45d553024..2a422064f 100644 --- a/src/bar-chart.js +++ b/src/bar-chart.js @@ -214,6 +214,9 @@ dc.barChart = function (parent, chartGroup) { } _chart.fadeDeselectedArea = function (selection) { + if (!_chart.brushOn()) { + return; + } var bars = _chart.chartBodyG().selectAll('rect.bar'); if (_chart.isOrdinal()) { diff --git a/src/box-plot.js b/src/box-plot.js index e75d64126..33f829edd 100644 --- a/src/box-plot.js +++ b/src/box-plot.js @@ -192,6 +192,9 @@ dc.boxPlot = function (parent, chartGroup) { } }); } else { + if (!_chart.brushOn()) { + return; + } var start = selection[0]; var end = selection[1]; var keyAccessor = _chart.keyAccessor();