How to use the @antv/g2.registerElement function in @antv/g2

To help you get started, we’ve selected a few @antv/g2 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 antvis / G2Plot / src / geoms / heatmap / contour.ts View on Github external
}

  private getColorScale(){
    const scales = this.get("scales");
    const colorField = this.get('color').fields[0];
    return scales[colorField];
  }

  private matchingSquar(values,threshold){

  }

}

registerElement('contourHeatmap', ContourHeatmap);
github antvis / G2Plot / src / geoms / heatmap / linear.ts View on Github external
draw(data) {
    this.set(MAPPED_DATA, data);

    this._prepareRange();
    this._prepareSize();

    const size = this.get(HEATMAP_SIZE);
    this._prepareGreyScaleBlurredCircle(size.radius);

    const range = this.get(VALUE_RANGE);
    this.drawWithRange(range);
  }
}

registerElement('linearHeatmap', LinearHeatmap);