Merge pull request #28987 from Ledragon/Issue-28134

#28134 : added InterpolateSineBow
This commit is contained in:
Jesse Trinity
2018-09-19 11:00:52 -07:00
committed by GitHub
2 changed files with 21 additions and 2 deletions
@@ -125,9 +125,21 @@ colorInterpolator = d3ScaleChromatic.interpolateMagma;
colorInterpolator = d3ScaleChromatic.interpolateInferno;
colorInterpolator = d3ScaleChromatic.interpolatePlasma;
colorInterpolator = d3ScaleChromatic.interpolateRainbow;
colorInterpolator = d3ScaleChromatic.interpolateSinebow;
colorInterpolator = d3ScaleChromatic.interpolateWarm;
colorInterpolator = d3ScaleChromatic.interpolateCool;
colorInterpolator = d3ScaleChromatic.interpolateCubehelixDefault;
const Viridis: string = d3ScaleChromatic.interpolateViridis(0.7);
const Magma: string = d3ScaleChromatic.interpolateMagma(0.7);
const Inferno: string = d3ScaleChromatic.interpolateInferno(0.7);
const Plasma: string = d3ScaleChromatic.interpolatePlasma(0.7);
const Rainbow: string = d3ScaleChromatic.interpolateRainbow(0.7);
const Sinebow: string = d3ScaleChromatic.interpolateSinebow(0.7);
const Warm: string = d3ScaleChromatic.interpolateWarm(0.7);
const Cool: string = d3ScaleChromatic.interpolateCool(0.7);
const CubehelixDefault: string = d3ScaleChromatic.interpolateCubehelixDefault(0.7);
colorInterpolator = d3ScaleChromatic.interpolateBuGn;
colorInterpolator = d3ScaleChromatic.interpolateBuPu;
colorInterpolator = d3ScaleChromatic.interpolateGnBu;
+9 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for D3JS d3-scale-chromatic module 1.2
// Type definitions for D3JS d3-scale-chromatic module 1.3
// Project: https://github.com/d3/d3-scale-chromatic/
// Definitions by: Hugues Stefanski <https://github.com/Ledragon>,
// Alex Ford <https://github.com/gustavderdrache>,
@@ -6,7 +6,7 @@
// Henrique Machado <https://github.com/henriquefm>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Last module patch version validated against: 1.2.0
// Last module patch version validated against: 1.3.2
// -----------------------------------------------------------------------
// Categorical
@@ -322,6 +322,13 @@ export function interpolateCool(t: number): string;
*/
export function interpolateRainbow(t: number): string;
/**
* Given a number t in the range [0,1], returns the corresponding color from the “sinebow” color scheme by Jim Bumgardner and Charlie Loyd.
*
* @param t A number in the interval [0, 1].
*/
export function interpolateSinebow(t: number): string;
/**
* Given a number t in the range [0,1], returns the corresponding color from Green’s default Cubehelix represented as an RGB string.
*