当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript d3.scaleSequential函数代码示例

本文整理汇总了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]);
}
开发者ID:GPegel,项目名称:grafana,代码行数:9,代码来源:color_scale.ts

示例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]);
}
开发者ID:shirish87,项目名称:grafana,代码行数:10,代码来源:color_legend.ts

示例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]);
  }
开发者ID:postsql,项目名称:grafana,代码行数:11,代码来源:rendering.ts

示例4: sequentialGreenBrownCbInterpolated

export function sequentialGreenBrownCbInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialGreenBrownCb));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts

示例5: sequentialVioletCbInterpolated

export function sequentialVioletCbInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialVioletCb));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts

示例6: sequentialBrownInterpolated

export function sequentialBrownInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialBrown));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts

示例7: sequentialLightGreenInterpolated

export function sequentialLightGreenInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialLightGreen));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts

示例8: sequentialTurquoiseInterpolated

export function sequentialTurquoiseInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialTurquoise));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts

示例9: sequentialPurpleInterpolated

export function sequentialPurpleInterpolated() {
    return scaleSequential(interpolateRgbBasis(paletteSequentialPurple));
}
开发者ID:proteus-h2020,项目名称:proteus-charts,代码行数:3,代码来源:colors.ts


注:本文中的d3.scaleSequential函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。