The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

SSteve (24) [Avatar] Offline
#1
Toward the end of section 2.2.3 where it says "By default, a D3 scale will continue to interpolate values greater than the maximum domain value and less than the minimum domain value."[i] I think [i]"a D3 scale will extrapolate values" would be more accurate.
SSteve (24) [Avatar] Offline
#2
Re: Chapter 2 - Listings 2.3 & 2.4
In listings 2.3 and 2.4 the width of the rectangles is 50, but the x attribute is set to i * 10, so the bars all overlap. x should be set to i * 60 to match the figures.

Also, the var yScale lines aren't formatted as code.
elijah.meeks (127) [Avatar] Offline
#3
Re: Chapter 2
You're absolutely right, that does become extrapolation, by definition.
SSteve (24) [Avatar] Offline
#4
Re: Chapter 2 - Figure 2.20
In the Layout description in Figure 2.20 it says "with a max range value of that". I think it's supposed to be "with a max range value of 480 that".
SSteve (24) [Avatar] Offline
#5
Re: Chapter 2
We cross-posted and it doesn't look like you saw my last two posts in this thread.
elijah.meeks (127) [Avatar] Offline
#6
Re: Chapter 2
Got them, Steve. Thanks for this.
mikegriffin (8) [Avatar] Offline
#7
Re: Chapter 2
Minor stuff that was clearly wrong for anyone that has written any code but might be a good thing to correct in future additions.:

On page 47, chapter 2 you change from
var qScale
to
var qScaleName

but then after the introduction of qScaleName, the calls are qScale(x); in all of the examples.

#a returns “small” only if qScaleName(423); is #A and so forth. smilie
elijah.meeks (127) [Avatar] Offline
#8
Re: Chapter 2
I'm not sure how much of this was fixed in the last edit, but I'll make sure to take a second look and fix anything else that you noted here. Thanks!
418125 (1) [Avatar] Offline
#9
On page 53 section 2.1.3 under the header Scales and Scalings, a ramp is created using:

var newRamp = d3.scale.linear().domain([500000,13000000]).range([0,500]);

I've tried using this example in the console but there appears to be no scale property and no linear method.

There is however d3.scaleLinear() method.