React-D3 components.
var Intl = require('intl'); | |
console.log(new Intl.NumberFormat('de-ch', {style:'currency', currency:'chf'}).format(123456.789)); |
.DS_Store | |
build | |
node_modules |
A variation of this map. The SwissMap
component gets passed a url
property with which it attempts to load the map data. When the loading callback fires it updates its state and gets re-rendered. Reload the page if the loading fails (the URL has a 30 % chance to be invalid).
Using D3 in a React TransitionGroup to transition elements. D3 is used purely for transitions, not for data joins. The distinction between entering and exiting elements is handled by the TransitionGroup component. See the React documentation for further information.
Alternative implementations only with D3 and using React without addons.
Note: This implementation is around 30% slower in processing 1000 circles than the other two.
Using D3 in a React component to transition elements. Alternative implementations only with D3 and using React's TransitionGroup addon.
Avoid restarting running transitions by either starting one just on the .enter()
selection or by using selection.filter()
to only select elements which are not in transit yet.
Alternative implementations combining D3 with React and React TransitionGroup.
Re-implementation of this example combining React with D3 and TopoJSON. Map data from Swiss Maps.
Extract and list Swiss municipality coordinates from TopoJSON.
Topographic map of Switzerland with map data from Swiss Maps 2.0.
Thanks to Hugo Lopez for his approach on generating contour polygons.