From cdd486e2e10ce4409709d0972c300c2a46c6b148 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 17 Aug 2018 16:22:19 -0400 Subject: [PATCH] adjustments to scatter plot --- BUILD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.md b/BUILD.md index ce584cd..bcdca97 100644 --- a/BUILD.md +++ b/BUILD.md @@ -358,6 +358,8 @@ Here's what Chrome should look like: ![](https://i.imgur.com/nD9CW7V.png) +In summary, this selects all of the `circle` elements. It then sets the `cx` attribute of each `circle` to the result of a callback function. That callback function runs for each `circle` and takes the "run" data object associated with that `circle` and finds its `date` property (remember it's a string, e.g. `'October 3, 2017 at 6:00PM'`). It passes that string value to `parseTime()` which then turns the string into an actual JavaScript Date object. That Date object is then passed to `xScale()` which converts the date into a visual value. That visual value is then used for the `cx` attribute of the current `circle`. Since each `date` property of the objects in the `runs` array is different, the `circles` have different horizontal locations. + ## Set dynamic domains - At the moment, we're setting arbitrary min/max values for the domains of both distance and date