1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
| var echartData = [{
| value: 21,
| name: '系列1'
| }, {
| value: 38,
| name: '系列2'
| }, {
| value: 35,
| name: '系列3'
| }, {
| value: 31,
| name: '系列4'
| }, {
| value: 28,
| name: '系列5'
| }]
| var rich = {
| yellow: {
| color: "#3bc7ff",
| fontSize: 8,
| padding: [8, 0],
| align: 'center'
| },
| total: {
| color: "#A2C7F3",
| fontSize: 8,
| align: 'center'
| },
| white: {
| color: "#a2c7f3",
| align: 'center',
| fontSize: 8,
| padding: [8,0 ]
| },
| blue: {
| color: '#3bc7ff',
| fontSize: 8,
| align: 'center'
| },
| hr: {
| borderColor: '#a2c7f3',
| width: '100%',
| borderWidth: 1,
| height: 0,
| }
| }
| pieTemplate2 = {
| title:{
| text:"输入标题",
| textStyle:{
| color:'#fff',
| fontStyle:'normal',
| fontWeight:'bold',
| fontFamily:'sans-serif',
| fontSize:12
| }
| },
| textStyle:{
| fontFamily: "Microsoft YaHei",
| fontSize: 9,
| fontStyle: "normal",
| fontWeight: "normal",
| color: '#fff'
| },
| tooltip : {
| trigger: 'item',
| formatter: "{b} : {c} ({d}%)"
| },
| color: ['#fc962c', '#d83472', '#0F9AF8', '#2B63D5', '#37a2da', '#2ECACE','#6F81DA','#8378ea'],
| series: [{
| name: '值',
| type: 'pie',
| radius: ['42%', '50%'],
| hoverAnimation: false,
| label: {
| normal: {
| // formatter: function(params, ticket, callback) {
| // var total = 0;
| // var percent = 0;
| // echartData.forEach(function(value, index, array) {
| // total += value.value;
| // });
| // percent = ((params.value / total) * 100).toFixed(1);
| // return '{white|' + params.name + ':}{yellow|' + params.value + '}';
| // },
| borderWidth: 20,
| borderRadius: 4,
| rich: rich,
| textStyle: {
| fontSize: 8
| }
| },
| },
| labelLine: {
| normal: {
| length:5,
| length2: 5,
| }
| },
| data: echartData
| }]
| };
|
| pieTemplate2Series=[{
| name: '值',
| type: 'pie',
| radius: ['42%', '50%'],
| hoverAnimation: false,
| label: {
| normal: {
| // formatter: function(params, ticket, callback) {
| // var total = 0;
| // var percent = 0;
| // echartData.forEach(function(value, index, array) {
| // total += value.value;
| // });
| // percent = ((params.value / total) * 100).toFixed(1);
| // return '{white|' + params.name + ':}{yellow|' + params.value + '}';
| // },
| borderWidth: 20,
| borderRadius: 4,
| rich: rich,
| textStyle: {
| fontSize: 8
| }
| },
| },
| labelLine: {
| normal: {
| length:5,
| length2: 5,
| }
| },
| data: echartData
| }]
|
|