diff --git a/dist/mg_line_brushing.js b/dist/mg_line_brushing.js index 9af288e..6147d2b 100644 --- a/dist/mg_line_brushing.js +++ b/dist/mg_line_brushing.js @@ -50,7 +50,7 @@ function get_brush_interval(args) { if (!resolution) { if (args.time_series) { - resolution = d3.time.day; + resolution = d3.timeDay; } else { resolution = 1; } @@ -145,11 +145,9 @@ function brushing() { .classed('mg-brush', true); extentRect = brushingGroup.append('rect') - .attr({ - opacity: 0, - y: args.top, - height: args.height - args.bottom - args.top - args.buffer - }) + .attr('opacity', 0) + .attr('y', args.top) + .attr('height', args.height - args.bottom - args.top - args.buffer) .classed('mg-extent', true); // mousedown, start area selection @@ -176,11 +174,10 @@ function brushing() { newX = Math.min(originX, mouseX), width = Math.max(originX, mouseX) - newX; - extentRect.attr({ - x: newX, - width: width, - opacity: 1 - }); + extentRect + .attr('x', newX) + .attr('width', width) + .attr('opacity', 1); } }); @@ -189,8 +186,7 @@ function brushing() { mouseDown = false; svg.classed('mg-brushing-in-progress', false); - var args = chartContext.args, - xScale = args.scales.X, + var xScale = args.scales.X, yScale = args.scales.Y, flatData = [].concat.apply([], args.data), boundedData,