Fix d3 portrait to landscape brush failure (#5638)

* fix d3 portrait to landscape brush failure

* fix client.renderer.test for highlighBrushPoints function prototype change

* fix highlightBrush

* move brush reset inside check for valid brush
This commit is contained in:
Jeremy Cunningham
2020-05-05 22:13:21 +03:00
committed by GitHub
parent 17eb4ae7bc
commit 7c5a69dd9a
6 changed files with 85 additions and 75 deletions
+4 -1
View File
@@ -64,7 +64,10 @@ describe('renderer', () => {
describe(`data.mills ${extent.mills} and chart().brush.extent() times ${extent.times}`, () => {
it(extent.expectation, () => {
renderer(mockClient, {}).highlightBrushPoints(mockData).should.equal(extent.expectedOpacity);
var selectedRange = mockClient.chart.createAdjustedRange();
var from = selectedRange[0].getTime();
var to = selectedRange[1].getTime();
renderer(mockClient, {}).highlightBrushPoints(mockData, from, to).should.equal(extent.expectedOpacity);
});
});
});