Skip to content

Commit

Permalink
npmignore + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bsouthga committed Dec 27, 2016
1 parent f7587cf commit 3d6d5f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .npmignore
@@ -1,3 +1,4 @@
node_modules/*
test/*
.vscode/*
.vscode/*
docs/*
12 changes: 8 additions & 4 deletions README.md
Expand Up @@ -17,6 +17,10 @@ A tiny d3 extension which lets you turn your maps into other types of charts!
npm install d3-exploder
```

**Note:**

d3-exploder >= 2.0.0 supports d3 v4. For use with d3 v3, install version 1 of d3-exploder.

### Usage


Expand Down Expand Up @@ -44,9 +48,9 @@ var width = 960,
height = 500,
centered;

var projection = d3.geo.albersUsa().scale(width);
var projection = d3.geoAlbersUsa().scale(width);

var path = d3.geo.path()
var path = d3.geoPath()
.projection(projection);

var svg = d3.select("body").append("svg")
Expand All @@ -60,7 +64,7 @@ d3.json("us.json", function(error, us) {

var state_features = topojson.feature(us, us.objects.states).features;

var scale = d3.scale.linear()
var scale = d3.scaleLinear()
.domain([0, state_features.length])
.range([0, 360]);

Expand All @@ -71,7 +75,7 @@ d3.json("us.json", function(error, us) {
.enter().append("path")
.attr("d", path);

var exploder = d3.geo.exploder()
var exploder = d3.exploder()
.projection(projection)
.size(function(d, i) { return 40; });

Expand Down

0 comments on commit 3d6d5f1

Please sign in to comment.