-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding graticule code in setProjection and plugin
adding graticule example adding CSS to style block removing pointer events from graticulte
- Loading branch information
1 parent
fc95c13
commit f467b67
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<body> | ||
<script src="http://d3js.org/d3.v3.min.js"></script> | ||
<script src="http://d3js.org/topojson.v1.min.js"></script> | ||
<!-- I recommend you host this file on your own, since this will change without warning --> | ||
<script src="/src/rel/datamaps.world.js?v=1"></script> | ||
<h2>Datamaps</h2> | ||
<div id="container1" style="position: relative; width: 500px; height: 600px;"></div> | ||
|
||
<script> | ||
//basic map config with custom fills, mercator projection | ||
var map = new Datamap({ | ||
scope: 'world', | ||
element: document.getElementById('container1'), | ||
projection: 'orthographic', | ||
fills: { | ||
defaultFill: 'rgba(0,0,0,0.7)', | ||
lt50: 'rgba(0,244,244,0.9)', | ||
gt50: 'red' | ||
}, | ||
projectionConfig: { | ||
rotation: [97,-30] | ||
}, | ||
data: { | ||
'071': {fillKey: 'lt50' }, | ||
'001': {fillKey: 'gt50' } | ||
} | ||
}); | ||
|
||
map.graticule(); | ||
|
||
|
||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters