Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MUR Drupal
d3-library
Commits
f430c20f
Commit
f430c20f
authored
Dec 19, 2012
by
Mike Bostock
Browse files
Remove symbol-map example.
Replaced by <
http://bl.ocks.org/4342045
>.
parent
8fb69fa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/symbol-map/symbol-map.html
deleted
100644 → 0
View file @
8fb69fa2
<!DOCTYPE html>
<meta
charset=
"utf-8"
>
<title>
U.S. States
</title>
<style>
svg
{
width
:
960px
;
height
:
500px
;
}
#states
path
,
#state-centroids
circle
{
fill
:
#ccc
;
stroke
:
#fff
;
stroke-width
:
1.5px
;
}
#state-centroids
circle
{
fill
:
steelblue
;
fill-opacity
:
.8
;
}
</style>
<body>
<script
src=
"../../d3.js"
></script>
<script>
var
r
=
d3
.
scale
.
sqrt
()
.
domain
([
0
,
1
e6
])
.
range
([
0
,
10
]);
var
projection
=
d3
.
geo
.
albersUsa
();
var
svg
=
d3
.
select
(
"
body
"
).
append
(
"
svg
"
);
var
states
=
svg
.
append
(
"
g
"
).
attr
(
"
id
"
,
"
states
"
);
var
centroids
=
svg
.
append
(
"
g
"
).
attr
(
"
id
"
,
"
state-centroids
"
);
d3
.
json
(
"
../data/us-states.json
"
,
function
(
error
,
collection
)
{
states
.
append
(
"
path
"
)
.
datum
(
collection
)
.
attr
(
"
d
"
,
d3
.
geo
.
path
().
projection
(
projection
));
});
d3
.
json
(
"
../data/us-state-centroids.json
"
,
function
(
error
,
collection
)
{
centroids
.
selectAll
(
"
circle
"
)
.
data
(
collection
.
features
.
sort
(
function
(
a
,
b
)
{
return
b
.
properties
.
population
-
a
.
properties
.
population
;
}))
.
enter
().
append
(
"
circle
"
)
.
attr
(
"
transform
"
,
function
(
d
)
{
return
"
translate(
"
+
projection
(
d
.
geometry
.
coordinates
)
+
"
)
"
;
})
.
attr
(
"
r
"
,
0
)
.
transition
()
.
duration
(
1000
)
.
delay
(
function
(
d
,
i
)
{
return
i
*
50
;
})
.
attr
(
"
r
"
,
function
(
d
)
{
return
r
(
d
.
properties
.
population
);
});
});
</script>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment