# @antv/attr

> The Attribute module for G2, F2.

Latest version **0.3.5** (published 2023-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @antv/attr
pnpm add @antv/attr
yarn add @antv/attr
bun add @antv/attr
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2023-03-23 |
| First published | 2018-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 57.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | https://github.com/orgs/antvis/people |
| Maintainers | yisi.wang, basketduck, biupiubiupiu, flash1, dreammy23, laixingui.lxg, zhangjunjie-loki, rainy25ghz, zeyuwang, yanxiong, susiwen8, freestyle21, soundquiet, elaine.q.10, sturuby, lviser, sakuya223, serializedowen, xdzhao, yangzhanmei, wjgogogo, leungwensen, dori, iaaron, yard, simaq, dxq613, intchous, susan_ann, jinke.li, lzxue, army8735, atool, baizn, dengfuping, neoddish, jeffy2012, zqlu, afc163, pomelo-nwu, kopiluwaky, ccnuzindex, panyuqi, bubkoo, zengyue, kasmine, boyu.zlj, l1ud0ngq1, newbyvector, winniexing, chenluli, kn9117, xdddst, semious2020, esora, nadia_liu, bbsqq, mxz96102, openwayne, pearmini, pddpd, yiqianyao, zhanba, cxxxxxn |
| Keywords | antv, attr, g2, f2 |

## Links

- npm: https://www.npmjs.com/package/@antv/attr
- Repository: https://github.com/antvis/attr
- Homepage: https://github.com/antvis/attr#readme
- Issues: https://github.com/antvis/attr/issues
- npm.io page: https://npm.io/package/@antv/attr

## Dependencies (4)

- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [@antv/util](https://npm.io/package/@antv/util.md) ~2.0.0
- [@antv/scale](https://npm.io/package/@antv/scale.md) ^0.3.0
- [@antv/color-util](https://npm.io/package/@antv/color-util.md) ^2.0.1

## Recent versions

- 0.3.5 (latest) — 2023-03-23
- 0.0.1-beta.3 (beta) — 2018-06-25
- 0.3.4 — 2023-03-22
- 0.3.3 — 2022-02-10
- 0.3.2 — 2020-02-05
- 0.3.1 — 2020-01-10
- 0.2.0 — 2019-08-19
- 0.1.2 — 2018-11-14
- 0.1.1 — 2018-11-09
- 0.1.0 — 2018-10-24
- 0.0.7 — 2018-09-14
- 0.0.6 — 2018-07-23
- 0.0.5 — 2018-07-23
- 0.0.4 — 2018-07-19
- 0.0.3 — 2018-06-25
- … 4 more at https://npm.io/package/@antv/attr/versions

## README

# @antv/attr

> Mapping data to visual AES.


![](https://img.shields.io/badge/language-javascript-red.svg)
![](https://img.shields.io/badge/license-MIT-000000.svg)
[![npm package](https://img.shields.io/npm/v/@antv/attr.svg)](https://www.npmjs.com/package/@antv/attr)
[![NPM downloads](http://img.shields.io/npm/dm/@antv/attr.svg)](https://npmjs.org/package/@antv/attr)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/antvis/attr.svg)](http://isitmaintained.com/project/antvis/attr "Percentage of issues still open")


## Installing

```bash
npm install @antv/attr
```


## Usage


```js
import { getAttribute } from '@antv/adjust';

// contains Color, Opacity, Position, Shape, Size
const Color = getAttribute('color');

const color = new Color({/* ... */});

// mapping data to color
const r = color.mapping('杭州');
```


## License

MIT

---
_Source: https://npm.io/package/@antv/attr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
