本文整理汇总了TypeScript中d3.scaleSequential函数的典型用法代码示例。如果您正苦于以下问题:TypeScript scaleSequential函数的具体用法?TypeScript scaleSequential怎么用?TypeScript scaleSequential使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scaleSequential函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getColorScale
export function getColorScale(colorScheme: any, lightTheme: boolean, maxValue: number, minValue = 0): (d: any) => any {
let colorInterpolator = d3ScaleChromatic[colorScheme.value];
let colorScaleInverted = colorScheme.invert === 'always' || (colorScheme.invert === 'dark' && !lightTheme);
let start = colorScaleInverted ? maxValue : minValue;
let end = colorScaleInverted ? minValue : maxValue;
return d3.scaleSequential(colorInterpolator).domain([start, end]);
}
示例2: getColorScale
function getColorScale(colorScheme, maxValue, minValue = 0) {
let colorInterpolator = d3[colorScheme.value];
let colorScaleInverted = colorScheme.invert === 'always' ||
(colorScheme.invert === 'dark' && !contextSrv.user.lightTheme);
let start = colorScaleInverted ? maxValue : minValue;
let end = colorScaleInverted ? minValue : maxValue;
return d3.scaleSequential(colorInterpolator).domain([start, end]);
}
示例3: getColorScale
function getColorScale(maxValue) {
let colorScheme = _.find(ctrl.colorSchemes, {value: panel.color.colorScheme});
let colorInterpolator = d3[colorScheme.value];
let colorScaleInverted = colorScheme.invert === 'always' ||
(colorScheme.invert === 'dark' && !contextSrv.user.lightTheme);
let start = colorScaleInverted ? maxValue : 0;
let end = colorScaleInverted ? 0 : maxValue;
return d3.scaleSequential(colorInterpolator).domain([start, end]);
}
示例4: sequentialGreenBrownCbInterpolated
export function sequentialGreenBrownCbInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialGreenBrownCb));
}
示例5: sequentialVioletCbInterpolated
export function sequentialVioletCbInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialVioletCb));
}
示例6: sequentialBrownInterpolated
export function sequentialBrownInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialBrown));
}
示例7: sequentialLightGreenInterpolated
export function sequentialLightGreenInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialLightGreen));
}
示例8: sequentialTurquoiseInterpolated
export function sequentialTurquoiseInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialTurquoise));
}
示例9: sequentialPurpleInterpolated
export function sequentialPurpleInterpolated() {
return scaleSequential(interpolateRgbBasis(paletteSequentialPurple));
}