#28134 : added InterpolateSineBow

Added tests
This commit is contained in:
Hugues Stefanski
2018-09-18 19:08:31 +02:00
parent 4b71af2e23
commit 0ea1e37659
2 changed files with 19 additions and 0 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;
+7
View File
@@ -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.
*