Update SCATTER_PLOT.md

notes
Matt Huntington 3 years ago committed by GitHub
parent 93466db16f
commit 8aa5727ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1264,31 +1264,31 @@ d3.select('#container')
// //
// lots of code omitted here, including render() declaration... // lots of code omitted here, including render() declaration...
// //
var bottomAxis = d3.axisBottom(xScale); const bottomAxis = d3.axisBottom(xScale);
d3.select('#container') d3.select('#container')
.append('g') .append('g')
.attr('id', 'x-axis') .attr('id', 'x-axis')
.call(bottomAxis) .call(bottomAxis)
.attr('transform', 'translate(0,'+HEIGHT+')'); .attr('transform', 'translate(0,'+HEIGHT+')');
var leftAxis = d3.axisLeft(yScale); const leftAxis = d3.axisLeft(yScale);
d3.select('#container') d3.select('#container')
.append('g') .append('g')
.attr('id', 'y-axis') .attr('id', 'y-axis')
.call(leftAxis); .call(leftAxis);
// //
// code for create table omitted here... // code for create table omitted here...
// //
d3.select('#container').on('click', function(){ d3.select('#container').on('click', (event)=>{
// //
// click handler functionality omitted // click handler functionality omitted
// //
}); });
// //
// zoomCallback code omitted here // zoomCallback code omitted here
// //
var zoom = d3.zoom() const zoom = d3.zoom()
.on('zoom', zoomCallback); .on('zoom', zoomCallback);
d3.select('#container').call(zoom); d3.select('#container').call(zoom);
``` ```

Loading…
Cancel
Save