There seems to be a bug in voronoi clipping; setting .clipExtent([[-1, -10], [width + 1, height + 1]])
works around the issue for these particular points.
build | |
node_modules |
A demonstration of D3’s vertically-oriented bullet charts, based on this example.
Test case for WebKit bug 113573.
<!DOCTYPE html> | |
<script>window.top.location.replace("http://www.jasondavies.com/maps/clip-extent/")</script> |
Based on Mike Bostock’s [World Map][0], modified to automatically colour countries such that no adjacent countries share the same colour.
This is done by extracting the topology via [TopoJSON][1] and greedily picking colours until the constraint is fulfilled.
See also: [Graph coloring][2] on Wikipedia.
Update: Greedily colouring is now performed in a single line, thanks to Mike Bostock!
Trying to figure out if there’s a problem with Australia↔Austria spherical linear interpolation in the [World Countries][1] example, as hinted at by Hadley Wickham.
Note how the geodesic is always a straight line under the orthographic projection, since it is always going through the centre. (Except for the initial view centred at (0°, 0°), which is not on the geodesic). This is true for all azimuthal projections.
A version of Mike Bostock’s animated world countries, which uses a more accurate spherical interpolation.
{"type":"MultiPolygon","coordinates":[[[[-155.59,20.14],[-155.58,20.13],[-155.57,20.13],[-155.56,20.14],[-155.55,20.14],[-155.53,20.14],[-155.49,20.11],[-155.45,20.11],[-155.34,20.06],[-155.21,20],[-155.17,19.97],[-155.09,19.88],[-155.08,19.87],[-155.08,19.84],[-155.08,19.77],[-155.07,19.74],[-155.06,19.74],[-155.02,19.75],[-154.99,19.74],[-154.98,19.73],[-154.98,19.72],[-154.97,19.67],[-154.96,19.65],[-154.92,19.61],[-154.87,19.59],[-154.79,19.54],[-154.8,19.52],[-154.81,19.5],[-154.82,19.48],[-154.83,19.46],[-154.91,19.42],[-154.92,19.41],[-155.01,19.33],[-155.02,19.33],[-155.05,19.32],[-155.07,19.32],[-155.1,19.3],[-155.17,19.28],[-155.19,19.28],[-155.27,19.28],[-155.29,19.27],[-155.3,19.27],[-155.32,19.25],[-155.35,19.22],[-155.37,19.22],[-155.38,19.21],[-155.4,19.2],[-155.42,19.18],[-155.44,19.17],[-155.49,19.14],[-155.5,19.14],[-155.55,19.1],[-155.55,19.08],[-155.57,19.03],[-155.61,18.97],[-155.63,18.96],[-155.64,18.95],[-155.66,18.93],[-155.67,18.93],[-155.67,18.94],[-155.69,18.96],[-155.71,18.99],[-15 |
A demo of Mike Bostock’s TopoJSON using states & provinces boundaries from Natural Earth.
With simplification turned on (-s 100
), this reduces the original 57MB GeoJSON file to a mere 515KB!