Skip to content
Open
Show file tree
Hide file tree
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
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