graceguo-supercat closed pull request #4083: [Bugfix] Event annotation should
have min width
URL: https://github.com/apache/incubator-superset/pull/4083
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/assets/visualizations/nvd3_vis.js
b/superset/assets/visualizations/nvd3_vis.js
index 0e3d9e87a6..470f499094 100644
--- a/superset/assets/visualizations/nvd3_vis.js
+++ b/superset/assets/visualizations/nvd3_vis.js
@@ -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}`)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services