Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function row1(data) {
- var check = false;
- update(check);
- function update(check) {
- var team = d3.selectAll(".select1").property("value")
- data.forEach(function(d, i, columns) {
- d.male = +(d.male);
- d.female = +(d.female);
- d["Woman" + team] = +d["Woman" + team];
- d["Man" + team] = +d["Man" + team];
- return d;
- })
- if (check) {
- pyramid.update(data, team)
- percent.update(data, team)
- totals.update(data, team)
- } else {
- pyramid(data, team);
- percent(data, team);
- totals(data, team);
- }
- }
- d3.selectAll(".select1").on("change", function() {
- check = true;
- durations = 750;
- update(check);
- })
- }
- function row1(data) {
- data.forEach(function(d) {
- for (var key in d) {
- if (key !== "AgeRange") {
- d[key] = +d[key]
- }
- }
- });
- pyramid(data, "_one");
- percent(data, "_two");
- totals(data, "_three");
- d3.selectAll(".select1").on("change", function() {
- durations = 750;
- pyramid.update(data, this.value)
- percent.update(data, this.value)
- totals.update(data, this.value)
- });
- }
Add Comment
Please, Sign In to add comment