File tree 3 files changed +50
-0
lines changed
examples/more-plots/radial-bar/demo
3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ) ;
Original file line number Diff line number Diff line change 28
28
},
29
29
"screenshot" : " https://gw.alipayobjects.com/zos/antfincdn/l6uP5%26MiT7/385e3f80-52ec-49e9-9dfe-bd447e63203f.png"
30
30
},
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
+ },
31
49
{
32
50
"filename" : " background.ts" ,
33
51
"title" : {
Original file line number Diff line number Diff line change
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments