Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 3119ebe7 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

added whiskers

parent 767a2828
......@@ -12,18 +12,16 @@
}
.ac-box-upper-whisker {
stroke-width: 1px;
stroke-width: 2px;
shape-rendering: crispedges;
}
.ac-box-lower-whisker {
stroke-width: 1px;
stroke-width: 2px;
shape-rendering: crispedges;
}
.ac-box-box {
fill: rgb(124, 191, 255);
stroke: none;
shape-rendering: crispedges;
cursor: pointer;
}
......
......@@ -206,57 +206,63 @@ export default class extends Chart {
line.exit()
.remove();
// const upperWhisker = this.svg.selectAll('.ac-box-upper-whisker')
// .data(data);
//
// upperWhisker.enter()
// .append('line')
// .attr('class', 'ac-box-upper-whisker')
// .attr('x1', d => x(d.group) + x.bandwidth() / 3)
// .attr('y1', d => y(d.median))
// .attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
// .attr('y2', d => y(d.median))
// .transition()
// .duration(500)
// .attr('y1', d => y(d.upperWhisker))
// .attr('y2', d => y(d.upperWhisker));
//
// upperWhisker
// .transition()
// .duration(500)
// .attr('x1', d => x(d.group) + x.bandwidth() / 3)
// .attr('y1', d => y(d.upperWhisker))
// .attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
// .attr('y2', d => y(d.upperWhisker));
//
// upperWhisker.exit()
// .remove();
//
// const lowerWhisker = this.svg.selectAll('.ac-box-lower-whisker')
// .data(data);
//
// lowerWhisker.enter()
// .append('line')
// .attr('class', 'ac-box-lower-whisker')
// .attr('x1', d => x(d.group) + x.bandwidth() / 3)
// .attr('y1', d => y(d.median))
// .attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
// .attr('y2', d => y(d.median))
// .transition()
// .duration(500)
// .attr('y1', d => y(d.lowerWhisker))
// .attr('y2', d => y(d.lowerWhisker));
//
// lowerWhisker
// .transition()
// .duration(500)
// .attr('x1', d => x(d.group) + x.bandwidth() / 3)
// .attr('y1', d => y(d.lowerWhisker))
// .attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
// .attr('y2', d => y(d.lowerWhisker));
//
// lowerWhisker.exit()
// .remove();
const upperWhisker = this.svg.selectAll('.ac-box-upper-whisker')
.data(data);
upperWhisker.enter()
.append('line')
.attr('class', 'ac-box-upper-whisker')
.attr('stroke', d => color(d.group))
.attr('x1', d => x(d.group) + x.bandwidth() / 3)
.attr('y1', d => y(d.median))
.attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
.attr('y2', d => y(d.median))
.transition()
.duration(500)
.attr('y1', d => y(d.upperWhisker))
.attr('y2', d => y(d.upperWhisker));
upperWhisker
.transition()
.duration(500)
.attr('stroke', d => color(d.group))
.attr('x1', d => x(d.group) + x.bandwidth() / 3)
.attr('y1', d => y(d.upperWhisker))
.attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
.attr('y2', d => y(d.upperWhisker));
upperWhisker.exit()
.remove();
const lowerWhisker = this.svg.selectAll('.ac-box-lower-whisker')
.data(data);
lowerWhisker.enter()
.append('line')
.attr('class', 'ac-box-lower-whisker')
.attr('stroke', d => color(d.group))
.attr('x1', d => x(d.group) + x.bandwidth() / 3)
.attr('y1', d => y(d.median))
.attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
.attr('y2', d => y(d.median))
.transition()
.duration(500)
.attr('y1', d => y(d.lowerWhisker))
.attr('y2', d => y(d.lowerWhisker));
lowerWhisker
.transition()
.duration(500)
.attr('stroke', d => color(d.group))
.attr('x1', d => x(d.group) + x.bandwidth() / 3)
.attr('y1', d => y(d.lowerWhisker))
.attr('x2', d => x(d.group) + x.bandwidth() - x.bandwidth() / 3)
.attr('y2', d => y(d.lowerWhisker));
lowerWhisker.exit()
.remove();
const median = this.svg.selectAll('.ac-box-median')
.data(data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment