@antv/g2plot 2.3.31 → 2.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1270 -0
- package/{README.zh-CN.md → README.en-US.md} +33 -42
- package/README.md +43 -32
- package/dist/g2plot.min.js +3 -18
- package/dist/g2plot.min.js.map +1 -1
- package/esm/adaptor/common.d.ts +1 -0
- package/esm/adaptor/common.js +1 -0
- package/esm/adaptor/common.js.map +1 -1
- package/esm/adaptor/pattern.d.ts +10 -0
- package/esm/adaptor/pattern.js +54 -0
- package/esm/adaptor/pattern.js.map +1 -0
- package/esm/core/plot.d.ts +11 -1
- package/esm/core/plot.js +42 -1
- package/esm/core/plot.js.map +1 -1
- package/esm/index.d.ts +5 -1
- package/esm/index.js +5 -1
- package/esm/index.js.map +1 -1
- package/esm/plots/area/adaptor.js +2 -2
- package/esm/plots/area/adaptor.js.map +1 -1
- package/esm/plots/circle-packing/adaptor.js +4 -4
- package/esm/plots/circle-packing/adaptor.js.map +1 -1
- package/esm/plots/circle-packing/utils.d.ts +0 -5
- package/esm/plots/circle-packing/utils.js +1 -20
- package/esm/plots/circle-packing/utils.js.map +1 -1
- package/esm/plots/column/adaptor.js +3 -2
- package/esm/plots/column/adaptor.js.map +1 -1
- package/esm/plots/dual-axes/adaptor.js +6 -4
- package/esm/plots/dual-axes/adaptor.js.map +1 -1
- package/esm/plots/dual-axes/types.d.ts +2 -1
- package/esm/plots/dual-axes/types.js.map +1 -1
- package/esm/plots/dual-axes/util/geometry.js +3 -2
- package/esm/plots/dual-axes/util/geometry.js.map +1 -1
- package/esm/plots/dual-axes/util/legend.js +4 -1
- package/esm/plots/dual-axes/util/legend.js.map +1 -1
- package/esm/plots/funnel/geometries/basic.js +2 -7
- package/esm/plots/funnel/geometries/basic.js.map +1 -1
- package/esm/plots/heatmap/adaptor.js +2 -2
- package/esm/plots/heatmap/adaptor.js.map +1 -1
- package/esm/plots/heatmap/types.d.ts +4 -2
- package/esm/plots/heatmap/types.js.map +1 -1
- package/esm/plots/histogram/adaptor.js +2 -1
- package/esm/plots/histogram/adaptor.js.map +1 -1
- package/esm/plots/liquid/adaptor.js +2 -2
- package/esm/plots/liquid/adaptor.js.map +1 -1
- package/esm/plots/pie/adaptor.js +2 -1
- package/esm/plots/pie/adaptor.js.map +1 -1
- package/esm/plots/radial-bar/adaptor.js +2 -1
- package/esm/plots/radial-bar/adaptor.js.map +1 -1
- package/esm/plots/rose/adaptor.js +2 -2
- package/esm/plots/rose/adaptor.js.map +1 -1
- package/esm/plots/sunburst/adaptor.js +2 -2
- package/esm/plots/sunburst/adaptor.js.map +1 -1
- package/esm/plots/tiny-area/adaptor.js +2 -2
- package/esm/plots/tiny-area/adaptor.js.map +1 -1
- package/esm/plots/tiny-column/adaptor.js +2 -2
- package/esm/plots/tiny-column/adaptor.js.map +1 -1
- package/esm/plots/treemap/adaptor.js +2 -1
- package/esm/plots/treemap/adaptor.js.map +1 -1
- package/esm/plots/venn/adaptor.d.ts +23 -0
- package/esm/plots/venn/adaptor.js +177 -0
- package/esm/plots/venn/adaptor.js.map +1 -0
- package/esm/plots/venn/constant.d.ts +7 -0
- package/esm/plots/venn/constant.js +33 -0
- package/esm/plots/venn/constant.js.map +1 -0
- package/esm/plots/venn/index.d.ts +24 -0
- package/esm/plots/venn/index.js +47 -0
- package/esm/plots/venn/index.js.map +1 -0
- package/esm/plots/venn/interaction/action.d.ts +18 -0
- package/esm/plots/venn/interaction/action.js +77 -0
- package/esm/plots/venn/interaction/action.js.map +1 -0
- package/esm/plots/venn/interaction/index.d.ts +1 -0
- package/esm/plots/venn/interaction/index.js +15 -0
- package/esm/plots/venn/interaction/index.js.map +1 -0
- package/esm/plots/venn/label.d.ts +1 -0
- package/esm/plots/venn/label.js +31 -0
- package/esm/plots/venn/label.js.map +1 -0
- package/esm/plots/venn/layout/circleintersection.d.ts +29 -0
- package/esm/plots/venn/layout/circleintersection.js +186 -0
- package/esm/plots/venn/layout/circleintersection.js.map +1 -0
- package/esm/plots/venn/layout/diagram.d.ts +17 -0
- package/esm/plots/venn/layout/diagram.js +193 -0
- package/esm/plots/venn/layout/diagram.js.map +1 -0
- package/esm/plots/venn/layout/layout.d.ts +27 -0
- package/esm/plots/venn/layout/layout.js +593 -0
- package/esm/plots/venn/layout/layout.js.map +1 -0
- package/esm/plots/venn/shape.d.ts +1 -0
- package/esm/plots/venn/shape.js +42 -0
- package/esm/plots/venn/shape.js.map +1 -0
- package/esm/plots/venn/types.d.ts +27 -0
- package/esm/plots/venn/types.js +2 -0
- package/esm/plots/venn/types.js.map +1 -0
- package/esm/plots/venn/utils.d.ts +28 -0
- package/esm/plots/venn/utils.js +93 -0
- package/esm/plots/venn/utils.js.map +1 -0
- package/esm/types/annotation.d.ts +5 -1
- package/esm/types/annotation.js.map +1 -1
- package/esm/types/attr.d.ts +4 -1
- package/esm/types/attr.js.map +1 -1
- package/esm/types/common.d.ts +3 -1
- package/esm/types/common.js.map +1 -1
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/types/index.js.map +1 -1
- package/esm/types/pattern.d.ts +47 -0
- package/esm/types/pattern.js +1 -0
- package/esm/types/pattern.js.map +1 -0
- package/esm/utils/color/blend.d.ts +20 -0
- package/esm/utils/color/blend.js +92 -0
- package/esm/utils/color/blend.js.map +1 -0
- package/esm/utils/padding.d.ts +5 -0
- package/esm/utils/padding.js +19 -0
- package/esm/utils/padding.js.map +1 -1
- package/esm/utils/pattern/dot.d.ts +32 -0
- package/esm/utils/pattern/dot.js +69 -0
- package/esm/utils/pattern/dot.js.map +1 -0
- package/esm/utils/pattern/index.d.ts +17 -0
- package/esm/utils/pattern/index.js +27 -0
- package/esm/utils/pattern/index.js.map +1 -0
- package/esm/utils/pattern/line.d.ts +25 -0
- package/esm/utils/pattern/line.js +56 -0
- package/esm/utils/pattern/line.js.map +1 -0
- package/esm/utils/pattern/square.d.ts +28 -0
- package/esm/utils/pattern/square.js +61 -0
- package/esm/utils/pattern/square.js.map +1 -0
- package/esm/utils/pattern/util.d.ts +50 -0
- package/esm/utils/pattern/util.js +90 -0
- package/esm/utils/pattern/util.js.map +1 -0
- package/lib/adaptor/common.d.ts +1 -0
- package/lib/adaptor/common.js +2 -0
- package/lib/adaptor/common.js.map +1 -1
- package/lib/adaptor/pattern.d.ts +10 -0
- package/lib/adaptor/pattern.js +58 -0
- package/lib/adaptor/pattern.js.map +1 -0
- package/lib/core/plot.d.ts +11 -1
- package/lib/core/plot.js +41 -0
- package/lib/core/plot.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/plots/area/adaptor.js +1 -1
- package/lib/plots/area/adaptor.js.map +1 -1
- package/lib/plots/circle-packing/adaptor.js +2 -2
- package/lib/plots/circle-packing/adaptor.js.map +1 -1
- package/lib/plots/circle-packing/utils.d.ts +0 -5
- package/lib/plots/circle-packing/utils.js +2 -22
- package/lib/plots/circle-packing/utils.js.map +1 -1
- package/lib/plots/column/adaptor.js +3 -2
- package/lib/plots/column/adaptor.js.map +1 -1
- package/lib/plots/dual-axes/adaptor.js +6 -4
- package/lib/plots/dual-axes/adaptor.js.map +1 -1
- package/lib/plots/dual-axes/types.d.ts +2 -1
- package/lib/plots/dual-axes/types.js.map +1 -1
- package/lib/plots/dual-axes/util/geometry.js +2 -1
- package/lib/plots/dual-axes/util/geometry.js.map +1 -1
- package/lib/plots/dual-axes/util/legend.js +4 -1
- package/lib/plots/dual-axes/util/legend.js.map +1 -1
- package/lib/plots/funnel/geometries/basic.js +1 -6
- package/lib/plots/funnel/geometries/basic.js.map +1 -1
- package/lib/plots/heatmap/adaptor.js +1 -1
- package/lib/plots/heatmap/adaptor.js.map +1 -1
- package/lib/plots/heatmap/types.d.ts +4 -2
- package/lib/plots/heatmap/types.js.map +1 -1
- package/lib/plots/histogram/adaptor.js +2 -1
- package/lib/plots/histogram/adaptor.js.map +1 -1
- package/lib/plots/liquid/adaptor.js +1 -1
- package/lib/plots/liquid/adaptor.js.map +1 -1
- package/lib/plots/pie/adaptor.js +2 -1
- package/lib/plots/pie/adaptor.js.map +1 -1
- package/lib/plots/radial-bar/adaptor.js +2 -1
- package/lib/plots/radial-bar/adaptor.js.map +1 -1
- package/lib/plots/rose/adaptor.js +1 -1
- package/lib/plots/rose/adaptor.js.map +1 -1
- package/lib/plots/sunburst/adaptor.js +1 -1
- package/lib/plots/sunburst/adaptor.js.map +1 -1
- package/lib/plots/tiny-area/adaptor.js +1 -1
- package/lib/plots/tiny-area/adaptor.js.map +1 -1
- package/lib/plots/tiny-column/adaptor.js +1 -1
- package/lib/plots/tiny-column/adaptor.js.map +1 -1
- package/lib/plots/treemap/adaptor.js +2 -1
- package/lib/plots/treemap/adaptor.js.map +1 -1
- package/lib/plots/venn/adaptor.d.ts +23 -0
- package/lib/plots/venn/adaptor.js +183 -0
- package/lib/plots/venn/adaptor.js.map +1 -0
- package/lib/plots/venn/constant.d.ts +7 -0
- package/lib/plots/venn/constant.js +36 -0
- package/lib/plots/venn/constant.js.map +1 -0
- package/lib/plots/venn/index.d.ts +24 -0
- package/lib/plots/venn/index.js +50 -0
- package/lib/plots/venn/index.js.map +1 -0
- package/lib/plots/venn/interaction/action.d.ts +18 -0
- package/lib/plots/venn/interaction/action.js +80 -0
- package/lib/plots/venn/interaction/action.js.map +1 -0
- package/lib/plots/venn/interaction/index.d.ts +1 -0
- package/lib/plots/venn/interaction/index.js +17 -0
- package/lib/plots/venn/interaction/index.js.map +1 -0
- package/lib/plots/venn/label.d.ts +1 -0
- package/lib/plots/venn/label.js +33 -0
- package/lib/plots/venn/label.js.map +1 -0
- package/lib/plots/venn/layout/circleintersection.d.ts +29 -0
- package/lib/plots/venn/layout/circleintersection.js +196 -0
- package/lib/plots/venn/layout/circleintersection.js.map +1 -0
- package/lib/plots/venn/layout/diagram.d.ts +17 -0
- package/lib/plots/venn/layout/diagram.js +201 -0
- package/lib/plots/venn/layout/diagram.js.map +1 -0
- package/lib/plots/venn/layout/layout.d.ts +27 -0
- package/lib/plots/venn/layout/layout.js +606 -0
- package/lib/plots/venn/layout/layout.js.map +1 -0
- package/lib/plots/venn/shape.d.ts +1 -0
- package/lib/plots/venn/shape.js +44 -0
- package/lib/plots/venn/shape.js.map +1 -0
- package/lib/plots/venn/types.d.ts +27 -0
- package/lib/plots/venn/types.js +4 -0
- package/lib/plots/venn/types.js.map +1 -0
- package/lib/plots/venn/utils.d.ts +28 -0
- package/lib/plots/venn/utils.js +98 -0
- package/lib/plots/venn/utils.js.map +1 -0
- package/lib/types/annotation.d.ts +5 -1
- package/lib/types/annotation.js.map +1 -1
- package/lib/types/attr.d.ts +4 -1
- package/lib/types/attr.js.map +1 -1
- package/lib/types/common.d.ts +3 -1
- package/lib/types/common.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/pattern.d.ts +47 -0
- package/lib/types/pattern.js +3 -0
- package/lib/types/pattern.js.map +1 -0
- package/lib/utils/color/blend.d.ts +20 -0
- package/lib/utils/color/blend.js +98 -0
- package/lib/utils/color/blend.js.map +1 -0
- package/lib/utils/padding.d.ts +5 -0
- package/lib/utils/padding.js +21 -1
- package/lib/utils/padding.js.map +1 -1
- package/lib/utils/pattern/dot.d.ts +32 -0
- package/lib/utils/pattern/dot.js +74 -0
- package/lib/utils/pattern/dot.js.map +1 -0
- package/lib/utils/pattern/index.d.ts +17 -0
- package/lib/utils/pattern/index.js +31 -0
- package/lib/utils/pattern/index.js.map +1 -0
- package/lib/utils/pattern/line.d.ts +25 -0
- package/lib/utils/pattern/line.js +61 -0
- package/lib/utils/pattern/line.js.map +1 -0
- package/lib/utils/pattern/square.d.ts +28 -0
- package/lib/utils/pattern/square.js +66 -0
- package/lib/utils/pattern/square.js.map +1 -0
- package/lib/utils/pattern/util.d.ts +50 -0
- package/lib/utils/pattern/util.js +99 -0
- package/lib/utils/pattern/util.js.map +1 -0
- package/package.json +10 -8
- package/src/adaptor/common.ts +2 -0
- package/src/adaptor/pattern.ts +66 -0
- package/src/core/plot.ts +43 -1
- package/src/index.ts +8 -1
- package/src/plots/area/adaptor.ts +3 -2
- package/src/plots/circle-packing/adaptor.ts +12 -3
- package/src/plots/circle-packing/utils.ts +1 -21
- package/src/plots/column/adaptor.ts +3 -1
- package/src/plots/dual-axes/adaptor.ts +6 -4
- package/src/plots/dual-axes/types.ts +11 -1
- package/src/plots/dual-axes/util/geometry.ts +3 -2
- package/src/plots/dual-axes/util/legend.ts +4 -1
- package/src/plots/funnel/geometries/basic.ts +2 -10
- package/src/plots/heatmap/adaptor.ts +12 -1
- package/src/plots/heatmap/types.ts +6 -2
- package/src/plots/histogram/adaptor.ts +13 -1
- package/src/plots/liquid/adaptor.ts +2 -2
- package/src/plots/pie/adaptor.ts +2 -0
- package/src/plots/radial-bar/adaptor.ts +2 -0
- package/src/plots/rose/adaptor.ts +2 -1
- package/src/plots/sunburst/adaptor.ts +2 -1
- package/src/plots/tiny-area/adaptor.ts +2 -2
- package/src/plots/tiny-column/adaptor.ts +2 -2
- package/src/plots/treemap/adaptor.ts +13 -1
- package/src/plots/venn/adaptor.ts +227 -0
- package/src/plots/venn/constant.ts +35 -0
- package/src/plots/venn/index.ts +47 -0
- package/src/plots/venn/interaction/action.ts +67 -0
- package/src/plots/venn/interaction/index.ts +17 -0
- package/src/plots/venn/label.ts +26 -0
- package/src/plots/venn/layout/circleintersection.ts +223 -0
- package/src/plots/venn/layout/diagram.ts +219 -0
- package/src/plots/venn/layout/layout.ts +734 -0
- package/src/plots/venn/shape.ts +53 -0
- package/src/plots/venn/types.ts +25 -0
- package/src/plots/venn/utils.ts +100 -0
- package/src/types/annotation.ts +3 -1
- package/src/types/attr.ts +7 -1
- package/src/types/common.ts +3 -1
- package/src/types/index.ts +1 -0
- package/src/types/pattern.ts +50 -0
- package/src/utils/color/blend.ts +103 -0
- package/src/utils/padding.ts +20 -0
- package/src/utils/pattern/dot.ts +86 -0
- package/src/utils/pattern/index.ts +45 -0
- package/src/utils/pattern/line.ts +70 -0
- package/src/utils/pattern/square.ts +78 -0
- package/src/utils/pattern/util.ts +104 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [
|
|
1
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | [简体中文](./README.md)
|
|
2
2
|
|
|
3
3
|
<h1 align="center">G2Plot</h1>
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A charting library based on the Grammar of Graphics.
|
|
8
8
|
|
|
9
9
|
[](https://npmjs.com/@antv/g2plot)
|
|
10
10
|
[](https://npmjs.com/@antv/g2plot)
|
|
@@ -15,61 +15,51 @@
|
|
|
15
15
|
[](http://isitmaintained.com/project/antvis/g2plot "Average time to resolve an issue")
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<a href="https://g2plot.antv.vision/en"
|
|
19
|
-
<a href="https://g2plot.antv.vision/en/docs/manual/getting-started"
|
|
20
|
-
<a href="https://www.yuque.com/antv/g2plot"
|
|
18
|
+
<a href="https://g2plot.antv.vision/en">Website</a> •
|
|
19
|
+
<a href="https://g2plot.antv.vision/en/docs/manual/getting-started">Quick Start</a> •
|
|
20
|
+
<a href="https://www.yuque.com/antv/g2plot">Blog</a> •
|
|
21
21
|
<a href="https://github.com/antvis/theme-set">AntV ThemeSet</a>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
1. 使用户不用成为可视化专家也能够轻松制作出优雅美观的图表。
|
|
29
|
-
2. 保证图表能够经受得起业务的检验,在真实的场景中易用、好用。
|
|
30
|
-
3. 探索统计图表的更多可能性,使统计图表变得更好玩、更酷。
|
|
26
|
+
G2Plot is an interactive and responsive charting library.
|
|
27
|
+
Based on [the grammar of graphics](https://github.com/antvis/g2), you can easily make superior statistical charts through a few lines of code.
|
|
31
28
|
|
|
32
29
|
<div align="center">
|
|
33
|
-
|
|
30
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
|
|
34
31
|
</div>
|
|
32
|
+
<br/>
|
|
35
33
|
|
|
36
|
-
## ✨
|
|
34
|
+
## ✨ Features
|
|
37
35
|
|
|
38
|
-
### 📦
|
|
36
|
+
### 📦 Pretty & Lightweight
|
|
39
37
|
|
|
40
|
-
G2Plot
|
|
38
|
+
With [AntV](https://antv.vision/en) design principles of data visualization, G2Plot provides standard and elegant visual styles as well as neat config options.
|
|
41
39
|
|
|
42
|
-
<
|
|
43
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*rqI2Qqt0pTwAAAAAAAAAAABkARQnAQ" width="600" />
|
|
44
|
-
</div>
|
|
40
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*rqI2Qqt0pTwAAAAAAAAAAABkARQnAQ" />
|
|
45
41
|
|
|
46
|
-
### 📊
|
|
42
|
+
### 📊 Responsive
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
G2Plot guarantees the readability of the charts in different sizes and data.
|
|
49
45
|
|
|
50
|
-
<
|
|
51
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*ifK1TLi_4WoAAAAAAAAAAABkARQnAQ" width="600" />
|
|
52
|
-
</div>
|
|
46
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*ifK1TLi_4WoAAAAAAAAAAABkARQnAQ" />
|
|
53
47
|
|
|
54
|
-
### 🔳
|
|
48
|
+
### 🔳 Storytelling
|
|
55
49
|
|
|
56
|
-
|
|
50
|
+
With the feature of _layers_, charts can be grouped, nested or linked to do exploratory analysis and expressive storytelling.
|
|
57
51
|
|
|
58
|
-
<
|
|
59
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*gd00QaD9110AAAAAAAAAAABkARQnAQ" width="600" />
|
|
60
|
-
</div>
|
|
52
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*gd00QaD9110AAAAAAAAAAABkARQnAQ" />
|
|
61
53
|
|
|
62
|
-
## 📦
|
|
54
|
+
## 📦 Installation
|
|
63
55
|
|
|
64
56
|
```bash
|
|
65
57
|
$ npm install @antv/g2plot
|
|
66
58
|
```
|
|
67
59
|
|
|
68
|
-
## 🔨
|
|
60
|
+
## 🔨 Usage
|
|
69
61
|
|
|
70
|
-
<
|
|
71
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450" />
|
|
72
|
-
</div>
|
|
62
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" />
|
|
73
63
|
|
|
74
64
|
```html
|
|
75
65
|
<div id="container"></div>
|
|
@@ -96,15 +86,13 @@ const bar = new Bar('container', {
|
|
|
96
86
|
bar.render();
|
|
97
87
|
```
|
|
98
88
|
|
|
99
|
-
## 🤝
|
|
89
|
+
## 🤝 How to Contribute
|
|
100
90
|
|
|
101
|
-
|
|
91
|
+
Your contributions are always welcome! Please Do have a look at the [issues](https://github.com/antvis/g2plot/issues) first.
|
|
102
92
|
|
|
103
|
-
|
|
93
|
+
To become a contributor, please follow our [contributing guide](https://github.com/antvis/g2plot/blob/master/CONTRIBUTING.md).
|
|
104
94
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
感谢下面这些贡献者 ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
95
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
108
96
|
|
|
109
97
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
110
98
|
<!-- prettier-ignore-start -->
|
|
@@ -165,16 +153,19 @@ bar.render();
|
|
|
165
153
|
|
|
166
154
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
167
155
|
|
|
168
|
-
|
|
156
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
157
|
+
|
|
158
|
+
## 📧 Contact us
|
|
169
159
|
|
|
170
160
|
钉钉群组号码: 30233731
|
|
171
161
|
|
|
172
162
|
<img src="https://gw.alipayobjects.com/zos/antfincdn/9sHnl5k%26u4/dingdingqun.png" width="200" height="266" />
|
|
163
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/8qEHi7GiaN/G2Plot-dingding.JPG" width="200" height="266" />
|
|
173
164
|
|
|
174
|
-
## 🔗
|
|
165
|
+
## 🔗 Links
|
|
175
166
|
|
|
176
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/) -
|
|
167
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/) - Online chart making tool based on G2Plot.
|
|
177
168
|
|
|
178
|
-
##
|
|
169
|
+
## License
|
|
179
170
|
|
|
180
171
|
MIT
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English
|
|
1
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](./README.en-US.md) | 简体中文
|
|
2
2
|
|
|
3
3
|
<h1 align="center">G2Plot</h1>
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
基于图形语法(the Grammar of Graphics)的图表库。
|
|
8
8
|
|
|
9
9
|
[](https://npmjs.com/@antv/g2plot)
|
|
10
10
|
[](https://npmjs.com/@antv/g2plot)
|
|
@@ -15,51 +15,61 @@ A charting library based on the Grammar of Graphics.
|
|
|
15
15
|
[](http://isitmaintained.com/project/antvis/g2plot "Average time to resolve an issue")
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<a href="https://g2plot.antv.vision/en"
|
|
19
|
-
<a href="https://g2plot.antv.vision/en/docs/manual/getting-started"
|
|
20
|
-
<a href="https://www.yuque.com/antv/g2plot"
|
|
18
|
+
<a href="https://g2plot.antv.vision/en">网站</a> •
|
|
19
|
+
<a href="https://g2plot.antv.vision/en/docs/manual/getting-started">快速开始</a> •
|
|
20
|
+
<a href="https://www.yuque.com/antv/g2plot">博客</a> •
|
|
21
21
|
<a href="https://github.com/antvis/theme-set">AntV ThemeSet</a>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
|
-
G2Plot
|
|
27
|
-
|
|
26
|
+
一套简单、易用、并具备一定扩展能力和组合能力的统计图表库,基于图形语法理论搭建而成,『G2Plot』中的 G2 即意指图形语法 (the Grammar of Graphics),同时也致敬了 [ggplot2](https://ggplot2.tidyverse.org/)。我们想做的事有三件:
|
|
27
|
+
|
|
28
|
+
1. 使用户不用成为可视化专家也能够轻松制作出优雅美观的图表。
|
|
29
|
+
2. 保证图表能够经受得起业务的检验,在真实的场景中易用、好用。
|
|
30
|
+
3. 探索统计图表的更多可能性,使统计图表变得更好玩、更酷。
|
|
28
31
|
|
|
29
32
|
<div align="center">
|
|
30
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
|
|
33
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
|
|
31
34
|
</div>
|
|
32
|
-
<br/>
|
|
33
35
|
|
|
34
|
-
## ✨
|
|
36
|
+
## ✨ 特性
|
|
35
37
|
|
|
36
|
-
### 📦
|
|
38
|
+
### 📦 开箱即用、体验优雅的高质量统计图表
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
G2Plot 呈现给用户的是一套提炼自企业级产品的视觉语言和设计规范。不仅对图表的整体视觉样式进行了优化,并且针对每一个图表自身的特点,沉淀出一套最佳配置,保证用户能够通过最少的配置制作出优雅、标准的图表。
|
|
39
41
|
|
|
40
|
-
<
|
|
42
|
+
<div align="center">
|
|
43
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*rqI2Qqt0pTwAAAAAAAAAAABkARQnAQ" width="600" />
|
|
44
|
+
</div>
|
|
41
45
|
|
|
42
|
-
### 📊
|
|
46
|
+
### 📊 响应式:让图表更聪明
|
|
43
47
|
|
|
44
|
-
G2Plot
|
|
48
|
+
在现实的图表应用场景中,一个棘手的难题是图表的展示空间往往并不足够显示图表的数据量,造成极值情况下文本的重叠遮挡、内容无法自适应、内容裁剪等问题。G2Plot 借鉴宽容性设计的思想,在图表的信息密度过高时,对图表辅助信息进行抽稀,保证图表主要信息的展示和基本可读性。
|
|
45
49
|
|
|
46
|
-
<
|
|
50
|
+
<div align="center">
|
|
51
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*ifK1TLi_4WoAAAAAAAAAAABkARQnAQ" width="600" />
|
|
52
|
+
</div>
|
|
47
53
|
|
|
48
|
-
### 🔳
|
|
54
|
+
### 🔳 向前一步:会讲故事的图表
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
在 G2Plot 体系下,图表不仅仅只是各不相关的实例,图层概念的引入提供了多图表组合、叠加、联动,共同讲述一个数据故事的可能性。未来,我们还将探索统计图表转化信息图的可能性,丰富统计图表的表现能力。
|
|
51
57
|
|
|
52
|
-
<
|
|
58
|
+
<div align="center">
|
|
59
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*gd00QaD9110AAAAAAAAAAABkARQnAQ" width="600" />
|
|
60
|
+
</div>
|
|
53
61
|
|
|
54
|
-
## 📦
|
|
62
|
+
## 📦 安装
|
|
55
63
|
|
|
56
64
|
```bash
|
|
57
65
|
$ npm install @antv/g2plot
|
|
58
66
|
```
|
|
59
67
|
|
|
60
|
-
## 🔨
|
|
68
|
+
## 🔨 使用
|
|
61
69
|
|
|
62
|
-
<
|
|
70
|
+
<div align="center">
|
|
71
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450" />
|
|
72
|
+
</div>
|
|
63
73
|
|
|
64
74
|
```html
|
|
65
75
|
<div id="container"></div>
|
|
@@ -86,13 +96,15 @@ const bar = new Bar('container', {
|
|
|
86
96
|
bar.render();
|
|
87
97
|
```
|
|
88
98
|
|
|
89
|
-
## 🤝
|
|
99
|
+
## 🤝 参与贡献
|
|
90
100
|
|
|
91
|
-
|
|
101
|
+
我们非常欢迎你的贡献!无论是 issue 还是 PR。
|
|
92
102
|
|
|
93
|
-
|
|
103
|
+
反馈问题请先阅读 [issues](https://github.com/antvis/g2plot/issues)。
|
|
94
104
|
|
|
95
|
-
|
|
105
|
+
提交代码请遵循 [贡献指引](https://github.com/antvis/g2plot/blob/master/CONTRIBUTING.md)。
|
|
106
|
+
|
|
107
|
+
感谢下面这些贡献者 ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
96
108
|
|
|
97
109
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
98
110
|
<!-- prettier-ignore-start -->
|
|
@@ -153,18 +165,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
153
165
|
|
|
154
166
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
155
167
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
## 📧 Contact us
|
|
168
|
+
## 📧 联系我们
|
|
159
169
|
|
|
160
170
|
钉钉群组号码: 30233731
|
|
161
171
|
|
|
162
172
|
<img src="https://gw.alipayobjects.com/zos/antfincdn/9sHnl5k%26u4/dingdingqun.png" width="200" height="266" />
|
|
173
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/8qEHi7GiaN/G2Plot-dingding.JPG" width="200" height="266" />
|
|
163
174
|
|
|
164
|
-
## 🔗
|
|
175
|
+
## 🔗 相关链接
|
|
165
176
|
|
|
166
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/) -
|
|
177
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/) - 基于 G2Plot 的在线图表制作工具,交互简单,一键导出图表代码!
|
|
167
178
|
|
|
168
|
-
##
|
|
179
|
+
## 许可证
|
|
169
180
|
|
|
170
181
|
MIT
|