Skip to content

Commit

Permalink
Fix issue #46: Call toString before trim for cases when data is not l…
Browse files Browse the repository at this point in the history
…oaded from CSV

Make this version 2.0.0
  • Loading branch information
yaph committed Oct 19, 2018
1 parent c8c5874 commit 4c22cba
Show file tree
Hide file tree
Showing 4 changed files with 5,693 additions and 3 deletions.
26 changes: 26 additions & 0 deletions examples/test-data-array.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<head>
<meta charset="utf-8">
<title>Test Data Array</title>
<link href="../dist/css/d3.geomap.css" rel="stylesheet">
</head>
<body>
<div class="container" id="main">
<h1>Test Data Array</h1>
<div id="map"></div>
</div>
<script src="../node_modules/d3/build/d3.js"></script>
<script src="../node_modules/d3-geo-projection/dist/d3-geo-projection.js"></script>
<script src="../node_modules/topojson/dist/topojson.js"></script>
<script src="../dist/js/d3.geomap.js"></script>
<script>
var map = d3.geomap.choropleth()
.geofile('../dist/topojson/world/countries.json')
.column('Requests')
.unitId('iso3');

let data = [{iso3: 'RUS', Requests: 10}, {iso3: 'ESP', Requests: 2}, {iso3: 'AUS', Requests: 20}];
map.draw(d3.select('#map').datum(data));
</script>
</body>
</html>
Loading

0 comments on commit 4c22cba

Please sign in to comment.