本文整理匯總了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));
}