Skip to content

Commit

Permalink
Event annotation should have min width (#4083)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmenges authored and Grace Guo committed Dec 18, 2017
1 parent 7cd9b85 commit 86f9087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@ function nvd3Vis(slice, payload) {
x: d => Math.min(xScale(new Date(d[e.timeColumn])),
xScale(new Date(d[e.intervalEndColumn]))),
y: 0,
width: d => Math.abs(xScale(new Date(d[e.intervalEndColumn])) -
xScale(new Date(d[e.timeColumn]))),
width: d => Math.max(Math.abs(xScale(new Date(d[e.intervalEndColumn])) -
xScale(new Date(d[e.timeColumn]))), 1),
height: annotationHeight,
})
.attr('class', `${e.opacity} ${e.style}`)
Expand Down

0 comments on commit 86f9087

Please sign in to comment.