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
- Host: GitHub
- URL: https://github.com/visiky/d2-infographic
- Owner: visiky
- License: mit
- Created: 2020-12-12T15:05:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-20T08:09:35.000Z (almost 4 years ago)
- Last Synced: 2025-03-17T07:51:23.881Z (about 1 year ago)
- Topics: d2, g2plot, infographic
- Language: TypeScript
- Homepage: https://visiky.github.io/d2-infographic
- Size: 62.5 KB
- Stars: 6
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
D2-Infographic for AntV * 2020 D2
[](https://www.npmjs.com/package/d2-infographic)
[](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).