Skip to content

Commit 4fb5990

Browse files
committed
change format to 120
1 parent 7713abe commit 4fb5990

20 files changed

Lines changed: 68 additions & 203 deletions

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,9 +795,7 @@ circles
795795
D3 is rather dumb when it comes to mapping data items to DOM elements. It doesn't take the order into account. So, if element 'a' was previously at the first position and now on the third it will bind it to the third element. However, this hampers animations, i.e. animated sorting. By using the _key_ argument of the `data` function, one can force that the same DOM element is bound to the same data item regardless of the item order.
796796

797797
```js
798-
const cscale = d3
799-
.scaleOrdinal(d3.schemeCategory10)
800-
.domain(["a", "b", "c", "d"]);
798+
const cscale = d3.scaleOrdinal(d3.schemeCategory10).domain(["a", "b", "c", "d"]);
801799
const xscale = d3
802800
.scaleBand()
803801
.domain(["a", "b", "c", "d"])

examples/barchart01_initial.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ <h1>Student's First Barchart</h1>
3838
.attr("height", height + margin.top + margin.bottom);
3939

4040
// Group used to enforce margin
41-
const g = svg
42-
.append("g")
43-
.attr("transform", `translate(${margin.left},${margin.top})`);
41+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
4442

4543
// Global variable for all data
4644
const data = [66.38, 21.51, 23.37, 34.17, 36.21];

examples/barchart02_title.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ <h1>Student's First Barchart</h1>
3838
.attr("height", height + margin.top + margin.bottom);
3939

4040
// Group used to enforce margin
41-
const g = svg
42-
.append("g")
43-
.attr("transform", `translate(${margin.left},${margin.top})`);
41+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
4442

4543
// Global variable for all data
4644
const data = [66.38, 21.51, 23.37, 34.17, 36.21];

examples/barchart03_json.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ <h1>Student's First Barchart</h1>
3838
.attr("height", height + margin.top + margin.bottom);
3939

4040
// Group used to enforce margin
41-
const g = svg
42-
.append("g")
43-
.attr("transform", `translate(${margin.left},${margin.top})`);
41+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
4442

4543
// Global variable for all data
4644
const data = [66.38, 21.51, 23.37, 34.17, 36.21];

examples/barchart04_scale.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ <h1>Student's First Barchart</h1>
3838
.attr("height", height + margin.top + margin.bottom);
3939

4040
// Group used to enforce margin
41-
const g = svg
42-
.append("g")
43-
.attr("transform", `translate(${margin.left},${margin.top})`);
41+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
4442

4543
// Global variable for all data
4644
let data;

examples/barchart05_interactive.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ <h1>Student's First Barchart</h1>
2828
<!--html filter checkbox-->
2929
<div>
3030
<strong>Filter:</strong>
31-
<label
32-
><input type="checkbox" name="US" value="1" id="filter-us-only" />US
33-
only</label
34-
>
31+
<label><input type="checkbox" name="US" value="1" id="filter-us-only" />US only</label>
3532
</div>
3633

3734
<script>
@@ -47,9 +44,7 @@ <h1>Student's First Barchart</h1>
4744
.attr("height", height + margin.top + margin.bottom);
4845

4946
// Group used to enforce margin
50-
const g = svg
51-
.append("g")
52-
.attr("transform", `translate(${margin.left},${margin.top})`);
47+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
5348

5449
// Global variable for all data
5550
let data;

examples/barchart06_animation.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ <h1>Student's First Barchart</h1>
2727

2828
<div>
2929
<strong>Filter:</strong>
30-
<label
31-
><input type="checkbox" name="US" value="1" id="filter-us-only" />US
32-
only</label
33-
>
30+
<label><input type="checkbox" name="US" value="1" id="filter-us-only" />US only</label>
3431
</div>
3532

3633
<script>
@@ -46,9 +43,7 @@ <h1>Student's First Barchart</h1>
4643
.attr("height", height + margin.top + margin.bottom);
4744

4845
// Group used to enforce margin
49-
const g = svg
50-
.append("g")
51-
.attr("transform", `translate(${margin.left},${margin.top})`);
46+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
5247

5348
// Global variable for all data
5449
let data;

examples/barchart07_final.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ <h1>Student's First Barchart</h1>
2727

2828
<div>
2929
<strong>Filter:</strong>
30-
<label
31-
><input type="checkbox" name="US" value="1" id="filter-us-only" />US
32-
only</label
33-
>
30+
<label><input type="checkbox" name="US" value="1" id="filter-us-only" />US only</label>
3431
</div>
3532

3633
<script>
@@ -46,9 +43,7 @@ <h1>Student's First Barchart</h1>
4643
.attr("height", height + margin.top + margin.bottom);
4744

4845
// Group used to enforce margin
49-
const g = svg
50-
.append("g")
51-
.attr("transform", `translate(${margin.left},${margin.top})`);
46+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
5247

5348
// Global variable for all data
5449
let data;

examples/bare.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ <h1>D3 Example</h1>
2727
.attr("height", height + margin.top + margin.bottom);
2828

2929
// Group used to enforce margin
30-
var g = svg
31-
.append("g")
32-
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
30+
var g = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")");
3331

3432
/////////////////////////
3533
////// YOUR CODE ////////

examples/mcv01_initial.html

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<title>Student's First Multiple Coordinated View</title>
7-
<meta
8-
name="description"
9-
content="Student's First Multiple Coordinated View"
10-
/>
7+
<meta name="description" content="Student's First Multiple Coordinated View" />
118
<meta name="viewport" content="width=device-width, initial-scale=1" />
129
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
1310
<script src="../web_modules/d3/dist/d3.js"></script>
14-
<link href="./style.css" rel="stylesheet" />
11+
<link href="./mvc.css" rel="stylesheet" />
1512
<style>
1613
rect {
1714
fill: steelblue;
@@ -89,9 +86,7 @@ <h3>Age Histogram</h3>
8986
.attr("height", height + margin.top + margin.bottom);
9087

9188
// Group used to enforce margin
92-
const g = svg
93-
.append("g")
94-
.attr("transform", `translate(${margin.left},${margin.top})`);
89+
const g = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
9590

9691
// Scales setup
9792
const xscale = d3.scaleLinear().range([0, width]);

0 commit comments

Comments
 (0)