An open API service indexing awesome lists of open source software.

https://github.com/visiky/d2-infographic

🎆 Infographic for AntV * D2, based on G2Plot
https://github.com/visiky/d2-infographic

d2 g2plot infographic

Last synced: about 1 year ago
JSON representation

🎆 Infographic for AntV * D2, based on G2Plot

Awesome Lists containing this project

README

          

D2-Infographic for AntV * 2020 D2



[![npm Version](https://img.shields.io/npm/v/d2-infographic.svg)](https://www.npmjs.com/package/d2-infographic)
[![npm License](https://img.shields.io/npm/l/d2-infographic.svg)](https://www.npmjs.com/package/d2-infographic)

> Infographic for D2 games, based on G2Plot v2. [LIVE DEMO](https://visiky.github.io/d2-infographic/)

## Online Game

## Install

```bash
$ npm i --save d2-infographic
```

## Usage

- render

```ts
import { G2Plot } from '@antv/g2plot';
import { adaptor, defaultOptions } from 'd2-infographic';

const infographic = new G2Plot('container', {
centralText: {
content: 'Hi, AntV',
style: {
fontSize: 24
}
}
}, adaptor, defaultOptions);

infographic.render();
```

- update

```ts
infographic.update({
music: { type: 'metal' },
});
```

## License

MIT@[visiky](https://github.com/visiky).