fixed scatterplot infinite render (#429)

* add more to state from componentDidMount

* always brush

* destructure

* move render to function

* fixed scatterplot infinite render

* remove logging
This commit is contained in:
Colin Megill
2018-11-09 20:28:22 -05:00
committed by GitHub
parent 47ce0cfc49
commit 9decf134e0
3 changed files with 68 additions and 41 deletions
@@ -215,7 +215,12 @@ class HistogramBrush extends React.Component {
d3.select(svgRef)
.append("g")
.attr("class", "brush")
.call(d3.brushX().on("end", this.onBrush(field, x.invert).bind(this)));
.call(
d3
.brushX()
.on("brush", this.onBrush(field, x.invert).bind(this))
.on("end", this.onBrush(field, x.invert).bind(this))
);
/* AXIS */
d3.select(svgRef)