Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for D3 4.x #13

Merged
merged 1 commit into from
Aug 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions dist/mg_line_brushing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand All @@ -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);
}
});

Expand All @@ -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,
Expand Down