How to use the @antv/coord/lib/index.Helix function in @antv/coord

To help you get started, we’ve selected a few @antv/coord 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 / G2 / test / unit / chart / controller / axis-spec.js View on Github external
it('_getHelixCfg', function() {
      const coord = new Coord.Helix({
        start,
        end
      });
      const helixCfg = as._getHelixCfg(coord);
      expect(helixCfg.crp.length).to.equal(202);
    });
  });
github antvis / G2 / test / unit / component / axis / helix-spec.js View on Github external
const expect = require('chai').expect;
const { Canvas } = require('../../../../src/renderer');
const HelixAxis = require('../../../../src/component/axis/helix');
const Coord = require('@antv/coord/lib/index');

const div = document.createElement('div');
div.id = 'c1';
document.body.appendChild(div);

const coord = new Coord.Helix({
  start: {
    x: 60,
    y: 460
  },
  end: {
    x: 460,
    y: 60
  }
});

const canvas = new Canvas({
  containerId: 'c1',
  width: 500,
  height: 500,
  pixelRatio: 2
});