williaster commented on a change in pull request #6234: [reviewable] Integrate 
@superset-ui/{core,color,chart} modules
URL: 
https://github.com/apache/incubator-superset/pull/6234#discussion_r232379309
 
 

 ##########
 File path: superset/assets/src/visualizations/Calendar/Calendar.js
 ##########
 @@ -80,9 +81,11 @@ function Calendar(element, props) {
       calContainer.text(`Metric: ${verboseMap[metric] || metric}`);
     }
     const timestamps = metricsData[metric];
-    const extents = d3.extent(Object.keys(timestamps), key => timestamps[key]);
+    const extents = d3Extent(Object.keys(timestamps), key => timestamps[key]);
     const step = (extents[1] - extents[0]) / (steps - 1);
-    const colorScale = colorScalerFactory(linearColorScheme, null, null, 
extents);
+    const colorScale = getSequentialSchemeRegistry()
+      .get(linearColorScheme)
+      .createLinearScale(extents);
 
     const legend = d3.range(steps)
 
 Review comment:
   also noting that you could swap out `d3Range` here and also get rid of `d3 
v3` in this file 🎉  (also not blocking you just seem to be swapping some so 
pointing out the low hanging 🍒🍌 :)

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to