superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Event annotation should have min width (#4083)
Date Mon, 18 Dec 2017 23:37:10 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 86f9087  Event annotation should have min width (#4083)
86f9087 is described below

commit 86f9087ea293e3e6c7c23e154951d3eff3ffde6f
Author: fabianmenges <fabianmenges@users.noreply.github.com>
AuthorDate: Mon Dec 18 18:37:05 2017 -0500

    Event annotation should have min width (#4083)
---
 superset/assets/visualizations/nvd3_vis.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js
index 0e3d9e8..470f499 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}`)

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message