MCPcopy Index your code
hub / github.com/antvis/coord

github.com/antvis/coord @0.4.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.7 ↗ · + Follow
84 symbols 229 edges 52 files 21 documented · 25% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@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.

Core symbols most depended-on inside this repo

map
called by 108
src/coordinate.ts
invert
called by 99
src/coordinate.ts
transform
called by 68
src/coordinate.ts
getOptions
called by 18
src/coordinate.ts
isMatrix
called by 8
src/utils/isMatrix.ts
clear
called by 7
src/coordinate.ts
compose
called by 5
src/utils/compose.ts
fisheyeTransform
called by 5
src/transforms/fisheye.ts

Shape

Function 52
Method 28
Class 4

Languages

TypeScript100%

Modules by API surface

src/coordinate3D.ts16 symbols
src/coordinate.ts16 symbols
src/transforms/fisheye.ts9 symbols
src/transforms/shear.ts5 symbols
src/transforms/reflect.ts3 symbols
src/transforms/polar.ts3 symbols
src/transforms/parallel.ts3 symbols
src/transforms/helix.ts3 symbols
src/transforms/cartesian3D.ts3 symbols
src/transforms/cartesian.ts3 symbols
__tests__/unit/utils/compose.spec.ts3 symbols
src/utils/extend.ts2 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add coord \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact