Revisions
-
mbostock revised this gist
Oct 27, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ license: gpl-3.0 redirect: https://beta.observablehq.com/@mbostock/d3-stacked-normalized-horizontal-bar-chart -
mbostock revised this gist
Jul 8, 2016 . 2 changed files with 55 additions and 79 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ This variation of a [stacked bar chart](/mbostock/3886208) shows percentages rather than absolute numbers. This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,115 +2,91 @@ <meta charset="utf-8"> <style> .bar { fill: steelblue; } .axis path { display: none; } </style> <svg width="960" height="500"></svg> <script src="//d3js.org/d3.v4.min.js"></script> <script> var svg = d3.select("svg"), margin = {top: 20, right: 60, bottom: 30, left: 40}, width = +svg.attr("width") - margin.left - margin.right, height = +svg.attr("height") - margin.top - margin.bottom, g = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var x = d3.scaleBand() .rangeRound([0, width]) .padding(0.1) .align(0.1); var y = d3.scaleLinear() .rangeRound([height, 0]); var z = d3.scaleOrdinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); var stack = d3.stack() .offset(d3.stackOffsetExpand); d3.csv("data.csv", type, function(error, data) { if (error) throw error; data.sort(function(a, b) { return b[data.columns[1]] / b.total - a[data.columns[1]] / a.total; }); x.domain(data.map(function(d) { return d.State; })); z.domain(data.columns.slice(1)); var serie = g.selectAll(".serie") .data(stack.keys(data.columns.slice(1))(data)) .enter().append("g") .attr("class", "serie") .attr("fill", function(d) { return z(d.key); }); serie.selectAll("rect") .data(function(d) { return d; }) .enter().append("rect") .attr("x", function(d) { return x(d.data.State); }) .attr("y", function(d) { return y(d[1]); }) .attr("height", function(d) { return y(d[0]) - y(d[1]); }) .attr("width", x.bandwidth()); g.append("g") .attr("class", "axis axis--x") .attr("transform", "translate(0," + height + ")") .call(d3.axisBottom(x)); g.append("g") .attr("class", "axis axis--y") .call(d3.axisLeft(y).ticks(10, "%")); var legend = serie.append("g") .attr("class", "legend") .attr("transform", function(d) { var d = d[d.length - 1]; return "translate(" + (x(d.data.State) + x.bandwidth()) + "," + ((y(d[0]) + y(d[1])) / 2) + ")"; }); legend.append("line") .attr("x1", -6) .attr("x2", 6) .attr("stroke", "#000"); legend.append("text") .attr("x", 9) .attr("dy", "0.35em") .attr("fill", "#000") .style("font", "10px sans-serif") .text(function(d) { return d.key; }); }); function type(d, i, columns) { for (i = 1, t = 0; i < columns.length; ++i) t += d[columns[i]] = +d[columns[i]]; d.total = t; return d; } </script> -
mbostock revised this gist
Feb 9, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ license: gpl-3.0 -
mbostock revised this gist
Oct 31, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ </style> <body> <script src="//d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 100, bottom: 30, left: 40}, -
mbostock revised this gist
Jun 11, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ </style> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> <script> var margin = {top: 20, right: 100, bottom: 30, left: 40}, @@ -60,6 +60,8 @@ .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.csv("data.csv", function(error, data) { if (error) throw error; color.domain(d3.keys(data[0]).filter(function(key) { return key !== "State"; })); data.forEach(function(d) { @@ -111,4 +113,4 @@ }); </script> -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -60,11 +60,11 @@ .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.csv("data.csv", function(error, data) { color.domain(d3.keys(data[0]).filter(function(key) { return key !== "State"; })); data.forEach(function(d) { var y0 = 0; d.ages = color.domain().map(function(name) { return {name: name, y0: y0, y1: y0 += +d[name]}; }); d.ages.forEach(function(d) { d.y0 /= y0; d.y1 /= y0; }); }); -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 52 additions and 52 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,52 +1,52 @@ State,Under 5 Years,5 to 13 Years,14 to 17 Years,18 to 24 Years,25 to 44 Years,45 to 64 Years,65 Years and Over AL,310504,552339,259034,450818,1231572,1215966,641667 AK,52083,85640,42153,74257,198724,183159,50277 AZ,515910,828669,362642,601943,1804762,1523681,862573 AR,202070,343207,157204,264160,754420,727124,407205 CA,2704659,4499890,2159981,3853788,10604510,8819342,4114496 CO,358280,587154,261701,466194,1464939,1290094,511094 CT,211637,403658,196918,325110,916955,968967,478007 DE,59319,99496,47414,84464,230183,230528,121688 DC,36352,50439,25225,75569,193557,140043,70648 FL,1140516,1938695,925060,1607297,4782119,4746856,3187797 GA,740521,1250460,557860,919876,2846985,2389018,981024 HI,87207,134025,64011,124834,356237,331817,190067 ID,121746,201192,89702,147606,406247,375173,182150 IL,894368,1558919,725973,1311479,3596343,3239173,1575308 IN,443089,780199,361393,605863,1724528,1647881,813839 IA,201321,345409,165883,306398,750505,788485,444554 KS,202529,342134,155822,293114,728166,713663,366706 KY,284601,493536,229927,381394,1179637,1134283,565867 LA,310716,542341,254916,471275,1162463,1128771,540314 ME,71459,133656,69752,112682,331809,397911,199187 MD,371787,651923,316873,543470,1556225,1513754,679565 MA,383568,701752,341713,665879,1782449,1751508,871098 MI,625526,1179503,585169,974480,2628322,2706100,1304322 MN,358471,606802,289371,507289,1416063,1391878,650519 MS,220813,371502,174405,305964,764203,730133,371598 MO,399450,690476,331543,560463,1569626,1554812,805235 MT,61114,106088,53156,95232,236297,278241,137312 NE,132092,215265,99638,186657,457177,451756,240847 NV,199175,325650,142976,212379,769913,653357,296717 NH,75297,144235,73826,119114,345109,388250,169978 NJ,557421,1011656,478505,769321,2379649,2335168,1150941 NM,148323,241326,112801,203097,517154,501604,260051 NY,1208495,2141490,1058031,1999120,5355235,5120254,2607672 NC,652823,1097890,492964,883397,2575603,2380685,1139052 ND,41896,67358,33794,82629,154913,166615,94276 OH,743750,1340492,646135,1081734,3019147,3083815,1570837 OK,266547,438926,200562,369916,957085,918688,490637 OR,243483,424167,199925,338162,1044056,1036269,503998 PA,737462,1345341,679201,1203944,3157759,3414001,1910571 RI,60934,111408,56198,114502,277779,282321,147646 SC,303024,517803,245400,438147,1193112,1186019,596295 SD,58566,94438,45305,82869,196738,210178,116100 TN,416334,725948,336312,550612,1719433,1646623,819626 TX,2027307,3277946,1420518,2454721,7017731,5656528,2472223 UT,268916,413034,167685,329585,772024,538978,246202 VT,32635,62538,33757,61679,155419,188593,86649 VA,522672,887525,413004,768475,2203286,2033550,940577 WA,433119,750274,357782,610378,1850983,1762811,783877 WV,105435,189649,91074,157989,470749,514505,285067 WI,362277,640286,311849,553914,1487457,1522038,750146 WY,38253,60890,29314,53980,137338,147279,65614 -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ .rangeRound([height, 0]); var color = d3.scale.ordinal() .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]); var xAxis = d3.svg.axis() .scale(x) -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,7 @@ .rangeRoundBands([0, width], .1); var y = d3.scale.linear() .rangeRound([height, 0]); var color = d3.scale.ordinal() .range(["#4682b4", "#536793", "#574d73", "#553355", "#733247", "#8c2f39", "#a52a2a"]); -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -65,7 +65,7 @@ data.forEach(function(d) { var y0 = 0; d.ages = ageNames.map(function(name) { return {name: name, y0: y0, y1: y0 += +d[name]}; }); d.ages.forEach(function(d) { d.y0 /= y0; d.y1 /= y0; }); }); data.sort(function(a, b) { return b.ages[0].y1 - a.ages[0].y1; }); -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -65,11 +65,9 @@ data.forEach(function(d) { var y0 = 0; d.ages = ageNames.map(function(name) { return {name: name, y0: y0, y1: y0 += +d[name]}; }); d.ages.reverse().forEach(function(d) { d.y0 /= y0; d.y1 /= y0; }); }); data.sort(function(a, b) { return b.ages[0].y1 - a.ages[0].y1; }); x.domain(data.map(function(d) { return d.State; })); -
mbostock revised this gist
Oct 14, 2012 . 2 changed files with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ This variation of a [stacked bar chart](../3886208) shows percentages rather than absolute numbers. This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -68,6 +68,8 @@ d.ages.forEach(function(d) { d.y0 /= y0; d.y1 /= y0; }); }); ageNames.reverse(); data.sort(function(a, b) { return b.ages[0].y1 - a.ages[0].y1; }); x.domain(data.map(function(d) { return d.State; })); -
mbostock revised this gist
Oct 14, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ .range([height, 0]); var color = d3.scale.ordinal() .range(["#4682b4", "#536793", "#574d73", "#553355", "#733247", "#8c2f39", "#a52a2a"]); var xAxis = d3.svg.axis() .scale(x) -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ .range([height, 0]); var color = d3.scale.ordinal() .range(["#2166ac", "#67a9cf", "#d1e5f0", "#f7f7f7", "#fddbc7", "#ef8a62", "#b2182b"]); var xAxis = d3.svg.axis() .scale(x) -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -60,9 +60,7 @@ .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.csv("data.csv", function(error, data) { var ageNames = d3.keys(data[0]).filter(function(key) { return key !== "State"; }); data.forEach(function(d) { var y0 = 0; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,9 @@ .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); d3.csv("data.csv", function(error, data) { var ageNames = d3.keys(data[0]) .filter(function(key) { return key !== "State"; }) .reverse(); data.forEach(function(d) { var y0 = 0; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 100, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; @@ -102,10 +102,10 @@ .attr("transform", function(d) { return "translate(" + x.rangeBand() / 2 + "," + y((d.y0 + d.y1) / 2) + ")"; }); legend.append("line") .attr("x2", 10); legend.append("text") .attr("x", 13) .attr("dy", ".35em") .text(function(d) { return d.name; }); -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 110, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 100, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 80, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 70, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -105,7 +105,7 @@ .attr("x2", 20); legend.append("text") .attr("x", 23) .attr("dy", ".35em") .text(function(d) { return d.name; }); -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -99,7 +99,7 @@ .data(function(d) { return d.ages; }) .enter().append("g") .attr("class", "legend") .attr("transform", function(d) { return "translate(" + x.rangeBand() / 2 + "," + y((d.y0 + d.y1) / 2) + ")"; }); legend.append("line") .attr("x2", 20); -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -84,7 +84,7 @@ var state = svg.selectAll(".state") .data(data) .enter().append("g") .attr("class", "state") .attr("transform", function(d) { return "translate(" + x(d.State) + ",0)"; }); state.selectAll("rect") -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -99,7 +99,7 @@ .data(function(d) { return d.ages; }) .enter().append("g") .attr("class", "legend") .attr("transform", function(d) { return "translate(" + (x(d.State) + x.rangeBand() / 2) + "," + y((d.y0 + d.y1) / 2) + ")"; }); legend.append("line") .attr("x2", 20); -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 20 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,12 +21,17 @@ display: none; } .legend line { stroke: #000; shape-rendering: crispEdges; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var margin = {top: 20, right: 60, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; @@ -90,6 +95,20 @@ .attr("height", function(d) { return y(d.y0) - y(d.y1); }) .style("fill", function(d) { return color(d.name); }); var legend = svg.select(".state:last-child").selectAll(".legend") .data(function(d) { return d.ages; }) .enter().append("g") .attr("class", "legend") .attr("transform", function(d) { return "translate(" + (x(d.State) + x.rangeBand() / 2) + "," + y((d.y0 + d.y1) / 2) + ")"); legend.append("line") .attr("x2", 20); legend.append("text") .attr("x", 26) .attr("dy", ".35em") .text(function(d) { return d.name; }); }); </script> -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ This variation of a [stacked bar chart](../3886208) shows percentages rather than absolute numbers. Colors by [Cynthia Brewer](http://colorbrewer2.org/). -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mbostock revised this gist
Oct 13, 2012 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -41,13 +41,12 @@ var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left") .tickFormat(d3.format(".0%")); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right)
NewerOlder