How to use the g2.Shape function in g2

To help you get started, we’ve selected a few 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 ant-design / ant-design-pro-site / scaffold / src / components / Charts / Gauge / index.js View on Github external
import React, { PureComponent } from 'react';
import G2 from 'g2';

const Shape = G2.Shape;

/* eslint no-underscore-dangle: 0 */
class Gauge extends PureComponent {
  componentDidMount() {
    this.renderChart();
  }

  componentWillReceiveProps(nextProps) {
    this.renderChart(nextProps);
  }

  handleRef = (n) => {
    this.node = n;
  }

  initChart(nextProps) {

g2

An implementation of the Grammar of Graphics in javascript

MIT
Latest version published 7 years ago

Package Health Score

70 / 100
Full package analysis