williaster commented on a change in pull request #4194: [bug fixes] annotations 
<> x domains, zeros in text
URL: 
https://github.com/apache/incubator-superset/pull/4194#discussion_r161648228
 
 

 ##########
 File path: superset/assets/visualizations/nvd3_vis.js
 ##########
 @@ -624,13 +624,24 @@ function nvd3Vis(slice, payload) {
 
             const tip = tipFactory(e);
             const records = (slice.annotationData[e.name].records || 
[]).map((r) => {
-              const timeColumn = new Date(r[e.timeColumn]);
+              const timeValue = new Date(r[e.timeColumn]);
               return {
                 ...r,
-                [e.timeColumn]: timeColumn,
+                [e.timeColumn]: timeValue,
               };
-            }).filter(r => !Number.isNaN(r[e.timeColumn].getMilliseconds()));
+            }).filter((r) => {
+              const isValid = !Number.isNaN(r[e.timeColumn].getMilliseconds());
+              if (isValid) {
+                xMin = xMin < r[e.timeColumn] ? xMin : r[e.timeColumn];
 
 Review comment:
   ?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to