d3-array#transpose JavaScript Examples
The following examples show how to use
d3-array#transpose.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: interpolators.js From website with Apache License 2.0 | 6 votes |
interpolateRgbMonotone = colors => {
const [r, g, b] = transpose(
colors.map(d => rgb(d)).map(({ r, g, b }) => [r, g, b]),
)
const R = monotone(r),
G = monotone(g),
B = monotone(b)
return t => rgb(R(t), G(t), B(t))
}