1 | # @antv/attr
|
2 |
|
3 | > Mapping data to visual AES.
|
4 |
|
5 |
|
6 | ![](https://img.shields.io/badge/language-javascript-red.svg)
|
7 | ![](https://img.shields.io/badge/license-MIT-000000.svg)
|
8 | [![npm package](https://img.shields.io/npm/v/@antv/attr.svg)](https://www.npmjs.com/package/@antv/attr)
|
9 | [![NPM downloads](http://img.shields.io/npm/dm/@antv/attr.svg)](https://npmjs.org/package/@antv/attr)
|
10 | [![Percentage of issues still open](http://isitmaintained.com/badge/open/antvis/attr.svg)](http://isitmaintained.com/project/antvis/attr "Percentage of issues still open")
|
11 |
|
12 |
|
13 | ## Installing
|
14 |
|
15 | ```bash
|
16 | npm install @antv/attr
|
17 | ```
|
18 |
|
19 |
|
20 | ## Usage
|
21 |
|
22 |
|
23 | ```js
|
24 | import { getAttribute } from '@antv/adjust';
|
25 |
|
26 | // contains Color, Opacity, Position, Shape, Size
|
27 | const Color = getAttribute('color');
|
28 |
|
29 | const color = new Color({/* ... */});
|
30 |
|
31 | // mapping data to color
|
32 | const r = color.mapping('杭州');
|
33 | ```
|
34 |
|
35 |
|
36 | ## License
|
37 |
|
38 | MIT
|