@antv/coord
The coordinate module for G2
Last updated 4 years ago by atool .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @antv/coord 
SYNC missed versions from official npm registry.

@antv/coord

Toolkit for mapping elements of sets into geometric objects. (demo)

examples

Build Status Coverage Status npm Version npm Download npm License

✨ Features

  • Powerful: Not only does @antv/coord provide some basic affine transformations(translate, rotate, scale, etc.), it also provide some advanced coordinate system transformations(polar, helix, parallel) and cool fisheye transformations.
  • Fixable: It is a independent lib which means you can use it with other libs besides G2, such as D3 to create some awesome charts and animations.
  • Fully embrace TypeScript: All code are written in TypeScript and complete type definition files are provided.

bubbles

📦 Installation

$ npm install @antv/coord

🔨 Getting Started

import { Coordinate, Options } from '@antv/coord';

const optons: Options = {
  x: 0,
  y: 0,
  width: 500,
  height: 500,
  transformations: [['cartesian']]
};

const coord = new Coordinate(options);
coord.transform('translate', 10, 10);
coord.map([0.5, 0.5]); // [260, 260]
coord.getSize(); // [500, 500]
coord.getCenter(); // [250, 250]

📎 Links

📮 Contribution

$ git clone git@github.com:antvis/coord.git

$ cd coord

$ npm i

$ npm t

Then send a pull request after coding.

📄 License

MIT@AntV.

Current Tags

  • 0.3.0-beta.1                                ...           beta (5 years ago)
  • 0.4.7                                ...           latest (a year ago)

25 Versions

  • 0.4.7                                ...           a year ago
  • 0.4.6                                ...           a year ago
  • 0.4.5                                ...           a year ago
  • 0.4.4                                ...           2 years ago
  • 0.4.3                                ...           3 years ago
  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.4.0-beta.3                                ...           3 years ago
  • 0.4.0-beta.2                                ...           3 years ago
  • 0.4.0-beta.1                                ...           3 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           5 years ago
  • 0.3.0-beta.1                                ...           5 years ago
  • 0.2.7                                ...           5 years ago
  • 0.2.6                                ...           5 years ago
  • 0.2.5                                ...           5 years ago
  • 0.2.4                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE