()
| 165 | } |
| 166 | |
| 167 | function brushed() { |
| 168 | var value = brush.extent()[0]; |
| 169 | |
| 170 | if (d3.event.sourceEvent && d3.mouse(this)[0]) { // not a programmatic event |
| 171 | value = x.invert(d3.mouse(this)[0]); |
| 172 | brush.extent([value, value]); |
| 173 | } |
| 174 | |
| 175 | handle.attr("cx", x(value)); |
| 176 | |
| 177 | if(config.onbrush) { |
| 178 | label.text(config.onbrush.call(this, value)); |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | robot.speak = function(text) { |