How to use the d3-scale-chromatic.interpolateViridis function in d3-scale-chromatic

To help you get started, we’ve selected a few d3-scale-chromatic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / aurelia / test / 1kcomponents / app.js View on Github external
update(i, count) {
    this.color = interpolateViridis(i / count);

    this.g.update(i);
    this.w.update(i);
    this.s.update(i);
    this.p.update(i);

    this.gx = this.g.x * magnitude + ww;
    this.gy = this.g.y * magnitude + wh;
    this.wx = this.w.x * magnitude + ww;
    this.wy = this.w.y * magnitude + wh;
    this.sx = this.s.x * magnitude + ww;
    this.sy = this.s.y * magnitude + wh;
    this.px = this.p.x * magnitude + ww;
    this.py = this.p.y * magnitude + wh;
  }
github aurelia / aurelia / test / 1kcomponents / app-double.js View on Github external
update(i, count) {
    this.color = interpolateViridis(i / count);

    this.g.update(i);
    this.w.update(i);
    this.s.update(i);
    this.p.update(i);

    this.gx = this.g.x * magnitude + ww;
    this.gy = this.g.y * magnitude + wh;
    this.wx = this.w.x * magnitude + ww;
    this.wy = this.w.y * magnitude + wh;
    this.sx = this.s.x * magnitude + ww;
    this.sy = this.s.y * magnitude + wh;
    this.px = this.p.x * magnitude + ww;
    this.py = this.p.y * magnitude + wh;
  }
github infernojs / inferno / docs / 1kcomponents / app.js View on Github external
makePoints(count) {
    const newPoints = [];
    for (var i = 0; i < count; i++) {
      newPoints.push({
        x: 0,
        y: 0,
        color: interpolateViridis(i / count),
      });
    }
    this.setAnchors(newPoints);
  }