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_r232378357
 
 

 ##########
 File path: superset/assets/src/modules/colors.js
 ##########
 @@ -25,13 +23,9 @@ export const colorScalerFactory = function (colors, data, 
accessor, extents, out
     ext = extents;
   }
   if (data) {
-    ext = d3.extent(data, accessor);
+    ext = d3Extent(data, accessor);
   }
   const chunkSize = (ext[1] - ext[0]) / (colors.length - 1);
   const points = colors.map((col, i) => ext[0] + (i * chunkSize));
-  const scaler = d3.scale.linear().domain(points).range(colors).clamp(true);
-  if (outputRGBA) {
-    return v => hexToRGB(scaler(v));
-  }
-  return scaler;
+  return d3.scale.linear().domain(points).range(colors).clamp(true);
 
 Review comment:
   just noting that if we swapped out `scaleLinear` from d3 v4 here would could 
get rid of d3 from another file -- def not blocking tho!

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