Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getScaleOrdinalColor = (color) => {
switch (color) {
case 'blue':
return d3.scaleOrdinal(d3_chromatic.schemeBlues);
case 'purple':
return d3.scaleOrdinal(d3_chromatic.schemePurples);
case 'red':
return d3.scaleOrdinal(d3_chromatic.schemeReds);
case 'green':
return d3.scaleOrdinal(d3_chromatic.schemeGreens);
case 'gray':
return d3.scaleOrdinal(d3_chromatic.schemeGreys);
case 'orange':
return d3.scaleOrdinal(d3_chromatic.schemeOranges);
default:
// purple
console.log('default', color);
return d3.scaleLinear(d3_chromatic.schemeOranges);
}
}
getScaleTimeColor = (color) => {
getScaleTimeColor = (color) => {
switch (color) {
case 'blue':
return d3.scaleTime(d3_chromatic.schemeBlues);
case 'purple':
return d3.scaleTime(d3_chromatic.schemePurples);
case 'red':
return d3.scaleTime(d3_chromatic.schemeReds);
case 'green':
return d3.scaleTime(d3_chromatic.schemeGreens);
case 'gray':
return d3.scaleTime(d3_chromatic.schemeGreys);
case 'orange':
return d3.scaleTime(d3_chromatic.schemeOranges);
default:
// purple
console.log('default!!!!!!!!!!!!!!!!!')
// color = null;
return d3.scaleTime(d3_chromatic.schemeGreys);
}
}
setupNavio = () => {