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.

Actually, to answer my own question, since the reference in my example is to the variable margin, not the value of the svg.marginTop, the equivalent non-jQuery alternative would be:

const g = svg.append('g')
.attr('transform', 'translate(' + margin.left + ',' + + ')');
Thanks, that's very helpful! I was having difficulty starting the server with the higher level directory since it had an index.html file which made it difficult to access the lower level folders and subfolders. Once I removed it, I could click down the paths rather than type out the whole URL.
Awesome, thanks!
On the subject of the HTTP server, is there any way to set it up so you can change the directory that is being served without stopping and starting up the http server every time you switch to a different directory?
Thanks. I assume that means the non-jQuery way of accessing margin.left and would be more complicated...

Could someone explain the use of $ in this line:

const g = svg.append('g')
.attr('transform', `translate(${margin.left}, ${})`);

found here:


I second that suggestion. I also would note the ES6 function implementation ( => ) -- my sense is that it's not common (yet?) to use it with d3.