1<script>
2
3// Draw a circle
4var myCircle = d3.select("#dataviz_brushing")
5 .append("svg")
6 .append("circle")
7 .attr("cx", 200)
8 .attr("cy", 200)
9 .attr("r", 40)
10 .attr("fill", "#69a3b2")
11
12// Add brushing
13d3.select("#dataviz_brushing")
14 .call( d3.brush() // Add the brush feature using the d3.brush function
15 .extent( [ [10,400], [400,400] ] ) // initialise the brush area: start at 0,0 and finishes at width,height: it means I select the whole graph area
16 )
17
18</script>
1<script>
2
3// Draw a circle
4var myCircle = d3.select("#dataviz_brushing")
5 .append("svg")
6 .append("circle")
7 .attr("cx", 200)
8 .attr("cy", 200)
9 .attr("r", 40)
10 .attr("fill", "#69a3b2")
11
12// Add brushing
13d3.select("#dataviz_brushing")
14 .call( d3.brush() // Add the brush feature using the d3.brush function
15 .extent( [ [400,0], [400,400] ] ) // initialise the brush area: start at 0,0 and finishes at width,height: it means I select the whole graph area
16 )
17
18</script>