Created
June 17, 2015 15:06
-
-
Save kburnham/52ed403af3a4291df853 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<div id="chartContainer"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://dimplejs.org/dist/dimple.v2.1.2.min.js"></script> | |
<script type="text/javascript"> | |
var svg = dimple.newSvg("#chartContainer", 590, 400); | |
d3.tsv("/muslim.attitudes.to.USA.China.tsv", function (data) { | |
var myChart = new dimple.chart(svg, data); | |
myChart.setBounds(80, 30, 480, 330) | |
myChart.addMeasureAxis("x", "Score"); | |
myChart.addCategoryAxis("y", "Country"); | |
myChart.addSeries(null, dimple.plot.bar); | |
myChart.addLegend(200, 10, 380, 20, "right"); | |
myChart.draw(); | |
}); | |
</script> | |
</div> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment