-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for #544 plus artifacts for last few commits
- Loading branch information
1 parent
bb9c892
commit fdc10bc
Showing
12 changed files
with
89 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>dc.js - Pie Chart Example</title> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" type="text/css" href="../css/dc.css"/> | ||
</head> | ||
<body> | ||
|
||
<div id="test"></div> | ||
|
||
<script type="text/javascript" src="../js/d3.js"></script> | ||
<script type="text/javascript" src="../js/crossfilter.js"></script> | ||
<script type="text/javascript" src="../js/dc.js"></script> | ||
<script type="text/javascript"> | ||
|
||
var chart = dc.pieChart("#test"); | ||
d3.csv("../examples/morley.csv", function(error, experiments) { | ||
|
||
var ndx = crossfilter(experiments), | ||
runDimension = ndx.dimension(function(d) {return "run-"+d.Run;}) | ||
speedSumGroup = runDimension.group().reduceSum(function(d) {return d.Speed * d.Run;}); | ||
|
||
var adjustX = 20, adjustY = 40; | ||
chart | ||
.width(window.innerWidth-adjustX) | ||
.height(window.innerHeight-adjustY) | ||
.slicesCap(4) | ||
.innerRadius(100) | ||
.dimension(runDimension) | ||
.group(speedSumGroup) | ||
.legend(dc.legend()); | ||
|
||
window.onresize = function() { | ||
chart | ||
.width(window.innerWidth-adjustX) | ||
.height(window.innerHeight-adjustY) | ||
.redraw(); | ||
}; | ||
|
||
chart.render(); | ||
}); | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |