Skip to content

Commit 11a45bb

Browse files
committed
docs(radial-bar): 增加两个新的玉珏图 demo
1 parent 46b792d commit 11a45bb

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { RadialBar } from '@antv/g2plot';
2+
3+
fetch('https://gw.alipayobjects.com/os/antfincdn/8elHX%26irfq/stack-column-data.json')
4+
.then((data) => data.json())
5+
.then((data) => {
6+
const plot = new RadialBar('container', {
7+
data,
8+
xField: 'year',
9+
yField: 'value',
10+
colorField: 'type',
11+
isGroup: true,
12+
maxAngle: 270,
13+
});
14+
15+
plot.render();
16+
});

examples/more-plots/radial-bar/demo/meta.json

+18
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@
2828
},
2929
"screenshot": "https://gw.alipayobjects.com/zos/antfincdn/l6uP5%26MiT7/385e3f80-52ec-49e9-9dfe-bd447e63203f.png"
3030
},
31+
{
32+
"filename": "stacked.ts",
33+
"title": {
34+
"zh": "堆叠玉珏图",
35+
"en": "Stacked Radial-Bar plot"
36+
},
37+
"new": true,
38+
"screenshot": "https://gw.alipayobjects.com/zos/antfincdn/tft60hEBvN/594d5cfc-8da0-441b-89dd-81eb4f5657b6.png"
39+
},
40+
{
41+
"filename": "grouped.ts",
42+
"title": {
43+
"zh": "分组玉珏图",
44+
"en": "Grouped Radial-Bar plot"
45+
},
46+
"new": true,
47+
"screenshot": "https://gw.alipayobjects.com/zos/antfincdn/M2EJJVBmHE/8984eee5-da51-4afb-8e81-34a8aaab47c0.png"
48+
},
3149
{
3250
"filename": "background.ts",
3351
"title": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { RadialBar } from '@antv/g2plot';
2+
3+
fetch('https://gw.alipayobjects.com/os/antfincdn/8elHX%26irfq/stack-column-data.json')
4+
.then((data) => data.json())
5+
.then((data) => {
6+
const plot = new RadialBar('container', {
7+
data,
8+
xField: 'year',
9+
yField: 'value',
10+
colorField: 'type',
11+
isStack: true,
12+
maxAngle: 270,
13+
});
14+
15+
plot.render();
16+
});

0 commit comments

Comments
 (0)