Comments (3)
I ran into a similar issue on a big project that still uses D3 V4.11.0 - .lock file got deleted and a reinstall generated this issue - Long story - I found that yarn didn't work and npm install did work -
For me the issue was with how peer dependency installs and resolve work with Yarn.
Read more here
I added this to my package.json
"resolutions": { "d3-selection": "1.1.0", "d3-dispatch": "1.0.6", "d3-brush": "1.1.4" },
And it fixed
from d3-brush.
d3-dispatch 1.0.6 added error checking for the type names passed to d3.dispatch. This revealed a bug in d3-brush where the brush function itself was being erroneously passed to d3.brush; this bug was fixed in d3-brush 1.1.4.
The second change you’re describing was included in d3-scale 2.2.0 (#113 #117). The behavior of a scale with a collapsed domain was previously not defined, so this change defined it as returning the midpoint of the range rather than the start.
In general, semantic versioning only means that supported behaviors continue working as defined in patch (and minor) releases. In both of these cases, the previous behaviors were neither intended or documented; they just happened to fall out of the existing implementation. I make a best effort to define what behaviors are supported in documentation (and verify said behavior in tests), but I’m not perfect, and there is undoubtedly other unsupported edge case behavior that may change over time. The only way to ensure that unsupported behaviors don’t change is to pin exact versions. If you’d like to contribute documentation to the README to better define supported behaviors, that would be welcome!
from d3-brush.
I've got the same using d3-brush version 1.1.5
`client.js?06a0:77 Error: illegal type: function brush(group) {
var overlay = group
.property("__brush", initialize)
.selectAll(".overlay")
.data([type("overlay")]);
overlay.enter().append("rect")
.attr("class", "overlay")
.attr("pointer-events", "all")
.attr("cursor", cursors.overlay)
.merge(overlay)
.each(function() {
var extent = local(this).extent;
Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this)
.attr("x", extent[0][0])
.attr("y", extent[0][1])
.attr("width", extent[1][0] - extent[0][0])
.attr("height", extent[1][1] - extent[0][1]);
});
group.selectAll(".selection")
.data([type("selection")])
.enter().append("rect")
.attr("class", "selection")
.attr("cursor", cursors.selection)
.attr("fill", "#777")
.attr("fill-opacity", 0.3)
.attr("stroke", "#fff")
.attr("shape-rendering", "crispEdges");
var handle = group.selectAll(".handle")
.data(dim.handles, function(d) { return d.type; });
handle.exit().remove();
handle.enter().append("rect")
.attr("class", function(d) { return "handle handle--" + d.type; })
.attr("cursor", function(d) { return cursors[d.type]; });
group
.each(redraw)
.attr("fill", "none")
.attr("pointer-events", "all")
.style("-webkit-tap-highlight-color", "rgba(0,0,0,0)")
.on("mousedown.brush touchstart.brush", started);
}
at dispatch (dispatch.js?b99e:5)
at brush (brush.js?f6ce:138)
at Module.brushX (brush.js?f6ce:124)
at eval (d3_timeseries.js?fe78:50)
at eval (timeseries.vue?b547:38)
at Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./components/timeseries.vue?vue&type=script&lang=js& (index.js:47)
at webpack_require (runtime.js:791)
at fn (runtime.js:151)
at eval (timeseries.vue?1a99:1)
at Module../components/timeseries.vue?vue&type=script&lang=js& (index.js:23)`
from d3-brush.
Related Issues (20)
- Brush event started does not initiate "points" variable HOT 1
- brush().touchable not a function HOT 2
- Can't create new brush selection inside extent, only change exsisting one HOT 1
- a brush transition is not interrupted HOT 1
- multitouch HOT 2
- FF android HOT 2
- Allow mousemove event triggering or switching brush state HOT 2
- brush.move should accept an event HOT 1
- Using brush for fine-grained zooming HOT 3
- Brush Wrapping
- Error multitouch emit undefined inside move function HOT 8
- Brushing uses wrong mouse coordinates if perspective transformations are applied HOT 3
- Is it possible to update d3-color ? HOT 2
- Conflict trying to .filter() with a false value if there is also a d3-zoom active
- incorrect position of the selected area in firefox HOT 2
- Allow to change default to CENTER mode HOT 2
- Errors when using `filter` on mobile HOT 2
- Customize the brush style HOT 2
- Brush handles disappear at zero width HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-brush.