Permalink
Browse files

Remove brush examples.

  • Loading branch information...
1 parent 36876f1 commit 7a67b00b3e040535a25a288c4065749baa443e64 @mbostock mbostock committed Dec 20, 2012
Showing with 0 additions and 276 deletions.
  1. +0 −90 examples/brush/brush-x.html
  2. +0 −89 examples/brush/brush-y.html
  3. +0 −97 examples/brush/brush.html
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Brush</title>
- <script src="../../d3.js"></script>
-<style>
-
-svg {
- font: 10px sans-serif;
-}
-
-circle {
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.selecting circle {
- fill-opacity: .2;
-}
-
-.selecting circle.selected {
- stroke: #f00;
-}
-
-.axis path, .axis line {
- fill: none;
- stroke: #000;
- shape-rendering: crispEdges;
-}
-
-.brush .extent {
- stroke: #fff;
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-</style>
-<body>
-<script>
-
-
-var data = d3.range(800).map(Math.random);
-
-var margin = {top: 10, right: 10, bottom: 20, left: 10},
- width = 960 - margin.right - margin.left,
- height = 100 - margin.top - margin.bottom;
-
-var x = d3.scale.linear()
- .range([0, width]);
-
-var y = d3.random.normal(height / 2, height / 8);
-
-var svg = d3.select("body").append("svg")
- .attr("width", width + margin.right + margin.left)
- .attr("height", height + margin.top + margin.bottom)
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
-svg.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + height + ")")
- .call(d3.svg.axis().scale(x).orient("bottom"));
-
-var circle = svg.append("g").selectAll("circle")
- .data(data)
- .enter().append("circle")
- .attr("transform", function(d) { return "translate(" + x(d) + "," + y() + ")"; })
- .attr("r", 3.5);
-
-svg.append("g")
- .attr("class", "brush")
- .call(d3.svg.brush().x(x)
- .on("brushstart", brushstart)
- .on("brush", brushmove)
- .on("brushend", brushend))
- .selectAll("rect")
- .attr("height", height);
-
-function brushstart() {
- svg.classed("selecting", true);
-}
-
-function brushmove() {
- var s = d3.event.target.extent();
- circle.classed("selected", function(d) { return s[0] <= d && d <= s[1]; });
-}
-
-function brushend() {
- svg.classed("selecting", !d3.event.target.empty());
-}
-
-</script>
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Brush</title>
- <script src="../../d3.js"></script>
-<style>
-
-svg {
- font: 10px sans-serif;
-}
-
-circle {
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.selecting circle {
- fill-opacity: .2;
-}
-
-.selecting circle.selected {
- stroke: #f00;
-}
-
-.axis path, .axis line {
- fill: none;
- stroke: #000;
- shape-rendering: crispEdges;
-}
-
-.brush .extent {
- stroke: #fff;
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-</style>
-<body>
-<script>
-
-
-var data = d3.range(800).map(Math.random);
-
-var margin = {top: 10, right: 10, bottom: 10, left: 40},
- width = 120 - margin.right - margin.left,
- height = 960 - margin.top - margin.bottom;
-
-var x = d3.random.normal(width / 2, width / 8);
-
-var y = d3.scale.linear()
- .range([height, 0]);
-
-var svg = d3.select("body").append("svg")
- .attr("width", width + margin.right + margin.left)
- .attr("height", height + margin.top + margin.bottom)
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
-svg.append("g")
- .attr("class", "y axis")
- .call(d3.svg.axis().scale(y).orient("left"));
-
-var circle = svg.append("g").selectAll("circle")
- .data(data)
- .enter().append("circle")
- .attr("transform", function(d) { return "translate(" + x() + "," + y(d) + ")"; })
- .attr("r", 3.5);
-
-svg.append("g")
- .attr("class", "brush")
- .call(d3.svg.brush().y(y)
- .on("brushstart", brushstart)
- .on("brush", brushmove)
- .on("brushend", brushend))
- .selectAll("rect")
- .attr("width", width);
-
-function brushstart() {
- svg.classed("selecting", true);
-}
-
-function brushmove() {
- var e = d3.event.target.extent();
- circle.classed("selected", function(d) { return e[0] <= d && d <= e[1]; });
-}
-
-function brushend() {
- svg.classed("selecting", !d3.event.target.empty());
-}
-
-</script>
View
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Brush</title>
- <script src="../../d3.js"></script>
-<style>
-
-svg {
- font: 10px sans-serif;
-}
-
-circle {
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.selecting circle {
- fill-opacity: .2;
-}
-
-.selecting circle.selected {
- stroke: #f00;
-}
-
-.axis path, .axis line {
- fill: none;
- stroke: #000;
- shape-rendering: crispEdges;
-}
-
-.brush .extent {
- stroke: #fff;
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-</style>
-<body>
-<script>
-
-
-var random = d3.random.normal(.5, .1),
- data = d3.range(800).map(function() { return [random(), random()]; });
-
-var margin = {top: 10, right: 10, bottom: 20, left: 40},
- width = 960 - margin.right - margin.left,
- height = 500 - margin.top - margin.bottom;
-
-var x = d3.scale.linear()
- .range([0, width]);
-
-var y = d3.scale.linear()
- .range([height, 0]);
-
-var svg = d3.select("body").append("svg")
- .attr("width", width + margin.right + margin.left)
- .attr("height", height + margin.top + margin.bottom)
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
-svg.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + height + ")")
- .call(d3.svg.axis().scale(x).orient("bottom"));
-
-svg.append("g")
- .attr("class", "y axis")
- .call(d3.svg.axis().scale(y).orient("left"));
-
-var circle = svg.append("g").selectAll("circle")
- .data(data)
- .enter().append("circle")
- .attr("transform", function(d) { return "translate(" + x(d[0]) + "," + y(d[1]) + ")"; })
- .attr("r", 3.5);
-
-svg.append("g")
- .attr("class", "brush")
- .call(d3.svg.brush().x(x).y(y)
- .on("brushstart", brushstart)
- .on("brush", brushmove)
- .on("brushend", brushend));
-
-function brushstart() {
- svg.classed("selecting", true);
-}
-
-function brushmove() {
- var e = d3.event.target.extent();
- circle.classed("selected", function(d) {
- return e[0][0] <= d[0] && d[0] <= e[1][0]
- && e[0][1] <= d[1] && d[1] <= e[1][1];
- });
-}
-
-function brushend() {
- svg.classed("selecting", !d3.event.target.empty());
-}
-
-</script>

0 comments on commit 7a67b00

Please sign in to comment.