Skip to content

Commit 32ce189

Browse files
authored
Merge pull request #19 from twolfe2/master
minor typos fixed
2 parents aa5a9fc + 2814127 commit 32ce189

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

z03-data-binding.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var sales = [
5454
</div>
5555

5656
And we want to map these to points on a scatterplot. We know we want each object
57-
in this array into of these to turn into `<rect>` tag, inside of our `<svg>`
57+
in this array to turn into a `<rect>` tag, inside of our `<svg>`
5858
below:
5959

6060
<div class="example-row-2">
@@ -106,7 +106,7 @@ none and we have 4 new data points, so obviously the right thing to do is to
106106
add a new `<rect>` for each data point.
107107

108108
The way D3 looks at this is a more subtle: we want to add a `<rect>`
109-
per data point, *but only for the new points the last data join*. Since this
109+
per data point, *but only for the new points since the last data join*. Since this
110110
is the first data binding (there are no rects currently), everything is new,
111111
it's straightforward to add new points. It's important to keep in mind that for
112112
the next selection, things will be more complex since there will already be
@@ -115,8 +115,7 @@ rects.
115115
The part of a D3 selection that represents these element-less data-points
116116
is `selection.enter()`;
117117

118-
<div class="example-row-1">
119-
<div class="example">
118+
<div class="example-row-1"> <div class="example">
120119
{% highlight javascript %}
121120
var newRects = rects.enter();
122121
{% endhighlight %}
@@ -309,7 +308,7 @@ nextrects.enter().append('rect'); // adds one element
309308

310309
## Transitions `selection.transition()`
311310

312-
The key function also important in case parts of our objects change -- if we
311+
The key function is also important in case parts of our objects change -- if we
313312
change a count, then we can update the appropriate element without having to
314313
delete and re-add the element, we can update it in place.
315314

@@ -478,4 +477,4 @@ mostly build on what we've already shown.
478477
</a>
479478

480479

481-
<script type="text/javascript" src="{{ "/javascripts/data-binding.js" | prepend: site.baseurl }}"></script>
480+
<script type="text/javascript" src="{{ "/javascripts/data-binding.js" | prepend: site.baseurl }}"></script>

0 commit comments

Comments
 (0)