MCPcopy Create free account
hub / github.com/adobe/Marinus / getColorScale

Function getColorScale

web_server/public/javascripts/draw_graph.js:206–212  ·  view source on GitHub ↗
(darkness)

Source from the content-addressed store, hash-verified

204 }
205
206 function getColorScale(darkness) {
207 return d3.scaleOrdinal()
208 .domain(graph.categoryKeys)
209 .range(graph.colors.map(function (c) {
210 return d3.hsl(c).darker(darkness).toString();
211 }));
212 }
213
214 graph.strokeColor = getColorScale(0.7);
215 graph.fillColor = getColorScale(-0.1);

Callers 1

drawGraphFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected