How to use the d3-scale-chromatic.schemeGreens function in d3-scale-chromatic

To help you get started, we’ve selected a few d3-scale-chromatic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github john-guerra / navio / shipyard / src / components / playground / navio-container / NavioContainer.jsx View on Github external
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) => {
github john-guerra / navio / shipyard / src / components / playground / navio-container / NavioContainer.jsx View on Github external
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 = () => {