Skip to content

Commit

Permalink
Fixes dc-js#1818
Browse files Browse the repository at this point in the history
  • Loading branch information
aberenyi committed Mar 15, 2021
1 parent 699f8dc commit 7879f0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/coordinate-grid-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export class CoordinateGridMixin extends ColorMixin(MarginMixin) {
.attr('x1', d => this._x(d))
.attr('y1', this._xAxisY() - this.margins().top)
.attr('x2', d => this._x(d))
.attr('y2', 0)
.attr('y2', this._useTopXAxis ? this.height() - this.margins().top - this.margins().bottom : 0)
.attr('opacity', 0);
transition(linesGEnter, this.transitionDuration(), this.transitionDelay())
.attr('opacity', 0.5);
Expand All @@ -589,7 +589,7 @@ export class CoordinateGridMixin extends ColorMixin(MarginMixin) {
.attr('x1', d => this._x(d))
.attr('y1', this._xAxisY() - this.margins().top)
.attr('x2', d => this._x(d))
.attr('y2', 0);
.attr('y2', this._useTopXAxis ? this.height() - this.margins().top - this.margins().bottom : 0);

// exit
lines.exit().remove();
Expand Down
1 change: 1 addition & 0 deletions web-src/examples/scatter-top.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
.margins({top: 30, right: 0, bottom: 10, left: 30})
.x(d3.scaleLinear().domain([6,20]))
.useTopXAxis(true)
.renderVerticalGridLines(true)
.xAxisLabel("This is the X Axis!")
.brushOn(false)
.symbolSize(8)
Expand Down

0 comments on commit 7879f0a

Please sign in to comment.