Mike Bostock

Results 751 comments of Mike Bostock

Here’s how to use d3.geoProject and d3.geoClipRectangle given any GeoJSON *object* (such as a Polygon): ```js function clipToRectangle(object, [x0, y0, x1, y1]) { return d3.geoProject(object, { stream: d3.geoClipRectangle(x0, y0, x1,...

Yea, I thought about this, and I think the Webber paper does specify how to choose an appropriate bound for the power based on the constant. But clearly I didn’t...

The new _ordinal_.invert feature seems reasonable. I think the only thing I’d change would be to rename the internal variable to `inverseIndex` because I tend to avoid abbreviations. I’m less...

You don’t strictly need a new API to support brushing and linking over ordinal domains. This example should be easily ported to the D3 4.0 API: http://bl.ocks.org/mbostock/4349509 That said I...

It occurs to me that this also (inadvertently) exposes _point_.invert and _band_.invert because of how band and point scales are implemented…

Thanks. I have two minor remaining considerations: - Is it okay that _ordinal_.invert implicitly coerces the range to strings? That’s symmetric with how _ordinal_ treats the domain, but previously the...

I appreciate you mentioning it earlier; I’m just keeping notes. That seems like a pretty clean and simple implementation of _ordinal_.invertExtent. What do you think? Is it useful?

Right, diverging scales don’t currently support reversed (or “descending”) domains. We’d need to add that feature.

See mbostock/d3#1923 for earlier discussion. One problem is that Image does not support the same API as XMLHttpRequest (for example, setting custom headers on the request, or aborting the request)....

FWIW, I’ve added [d3.image](https://github.com/d3/d3-fetch/blob/master/README.md#image) to [d3-fetch](https://github.com/d3/d3-fetch).