jmchart 1.2.10 → 1.2.12

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.
@@ -1,286 +1,286 @@
1
-
2
- /**
3
- * 基础样式
4
- *
5
- * @class jmChartStyle
6
- * @module jmChart
7
- * @static
8
- */
9
- export default {
10
- layout: 'normal', // inside 二边不对齐Y轴,内缩一个刻度 | normal
11
- margin:{
12
- left: 40,
13
- top: 20,
14
- right: 20,
15
- bottom: 40
16
- },
17
- itemLabel: {
18
- textAlign: 'left',
19
- textBaseline: 'middle',
20
- font: '12px Arial',
21
- fill: '#000'
22
- },
23
- // 跟随标线
24
- markLine: {
25
- x: true, // 显示X标线
26
- y: true, // 显示Y标线
27
- stroke: '#EB792A',
28
- fill: '#CCC',
29
- lineWidth: 1,
30
- radius: 5, // 中间小圆圈大小
31
- zIndex: 20
32
- },
33
- legend: {
34
- stroke: 'transparent',
35
- lineWidth: 0,
36
- margin: {
37
- left: 10,
38
- top: 10,
39
- right: 20,
40
- bottom: 10
41
- },
42
- width: 200,
43
- height: 0,
44
- item: {
45
- shape: {
46
- width:20,
47
- height:15
48
- },
49
- label: {
50
- textAlign: 'left',
51
- textBaseline: 'middle',
52
- font: '12px Arial',
53
- fill: '#000'
54
- },
55
- normal: {
56
- fill: 'transparent',
57
- cursor: 'default'
58
- },
59
- hover: {
60
- fill: '#ccc',
61
- cursor: 'pointer'
62
- }
63
- }
64
- },
65
- chartArea: {
66
- stroke: 'rgb(229,229,229)',
67
- zIndex: 5
68
- },
69
- axis: {
70
- stroke:'#05468E',
71
- lineWidth: 1,
72
- zIndex: 1 ,
73
- // 显示网格
74
- grid: {
75
- x: true, // 是否显示网格
76
- y: false,
77
- stroke: 'rgb(229,229,229)',
78
- lineType: 'dotted', // 虚线,不填为实线
79
- dashLength: 6, //虚线条间隔,默认5
80
- lineWidth: 1,
81
- zIndex: 0
82
- },
83
- // 如果标签居中 center,则把二头的标签左边的左对齐,右边的右对齐
84
- align: 'normal',
85
- xLabel : {
86
- count: 5,
87
- length: 5,
88
- fill: '#000',
89
- stroke: '#000',
90
- margin: {
91
- left: 0,
92
- top: 10,
93
- right: 6,
94
- bottom: 0
95
- },
96
- textAlign: 'center',
97
- textBaseline: 'top',
98
- font: '12px Arial',
99
- zIndex:20,
100
- // 旋转角度
101
- rotation: {
102
- angle: 0,
103
- point : { x: 0, y: 0 }
104
- }
105
- },
106
- yLabel : {
107
- count: 5,
108
- length: 1,
109
- fill: '#000',
110
- margin: {
111
- left: 2,
112
- top: 6,
113
- right: 8,
114
- bottom: 0
115
- },
116
- textAlign: 'right',
117
- textBaseline: 'middle',
118
- font: '12px Arial',
119
- zIndex:20,
120
- // 旋转角度
121
- rotation: {
122
- angle: 0,
123
- point : { x: 0, y: 0 }
124
- }
125
- }
126
- },
127
- // 图形样式集
128
- chartColors : [
129
- '#249FDA','#EA3B7C','#8EBC00','#309B46','#4B507E','#D8E404','#EB792A','#A00DA0'
130
- ],
131
- /*tooltip: {
132
- 'background-color': 'rgb(255,255,255)',
133
- 'padding':'4px',
134
- 'opacity':'0.8',
135
- 'border':'1px solid #000',
136
- 'box-shadow': '0 0 3px #000',
137
- 'border-radius': '6px'
138
- },*/
139
- line : {
140
- normal: {
141
- lineWidth: 1,
142
- zIndex: 18,
143
- cursor: 'default'
144
- },
145
- hover: {
146
- lineWidth:4,
147
- //zIndex: 100,
148
- cursor: 'pointer'
149
- },
150
- lineWidth:1,
151
- zIndex: 18,
152
- cursor: 'default',
153
- radius: 3,
154
- fill: null,
155
- showItem: false, // 是否展示圆点
156
- item: {
157
- fill: '#fff',
158
- zIndex: 19
159
- },
160
- // 默认不填充,需要填满请配置{fill:'',stroke:''}
161
- area: false
162
- },
163
- stackLine: {
164
- normal: {
165
- lineWidth: 1,
166
- zIndex: 18,
167
- cursor: 'default'
168
- },
169
- hover: {
170
- lineWidth:4,
171
- //zIndex: 100,
172
- cursor: 'pointer'
173
- },
174
- lineWidth:1,
175
- zIndex: 18,
176
- cursor: 'default',
177
- radius: 3,
178
- fill: null,
179
- showItem: true, // 是否展示圆点
180
- item: {
181
- fill: '#fff',
182
- zIndex: 19
183
- },
184
- // 默认不填充,需要填满请配置{fill:'',stroke:''}
185
- area: false
186
- },
187
- bar : {
188
- normal: {
189
- lineWidth: 1,
190
- zIndex: 17,
191
- cursor: 'default',
192
- opacity: 0.8
193
- },
194
- hover: {
195
- lineWidth:4,
196
- //zIndex: 100,
197
- opacity: 1,
198
- cursor: 'pointer'
199
- },
200
- lineWidth: 1,
201
- // 柱子宽占比,决定了柱子相对于总宽度
202
- perWidth: 0.5,
203
- zIndex: 17,
204
- cursor: 'default',
205
- close : true,
206
- shadow: {
207
- x: 1,
208
- y: 1,
209
- blur: 2,
210
- color: '#000'
211
- }
212
- },
213
- pie: {
214
- normal: {
215
- zIndex: 11,
216
- cursor: 'default',
217
- opacity: 0.8
218
- },
219
- hover: {
220
- //zIndex: 100,
221
- opacity: 1,
222
- cursor: 'pointer'
223
- },
224
- margin: {
225
- left: 10,
226
- top: 10,
227
- right: 10,
228
- bottom: 10
229
- },
230
- lineWidth: 1,
231
- zIndex: 11,
232
- cursor: 'default',
233
- close : true,
234
- shadow: {
235
- x: 1,
236
- y: 1,
237
- blur: 2,
238
- color: '#ccc'
239
- }
240
- },
241
- radar: {
242
- normal: {
243
- zIndex: 11,
244
- cursor: 'default',
245
- opacity: 0.8
246
- },
247
- hover: {
248
- //zIndex: 100,
249
- opacity: 1,
250
- cursor: 'pointer'
251
- },
252
- margin: {
253
- left: 10,
254
- top: 10,
255
- right: 10,
256
- bottom: 10
257
- },
258
- lineWidth: 1,
259
- zIndex: 11,
260
- cursor: 'default',
261
- close : true,
262
- shadow: {
263
- x: 1,
264
- y: 1,
265
- blur: 2,
266
- color: '#ccc'
267
- }
268
- },
269
- candlestick: {
270
- normal: {
271
- lineWidth: 1,
272
- zIndex: 18,
273
- cursor: 'default'
274
- },
275
- hover: {
276
- //zIndex: 100,
277
- cursor: 'pointer'
278
- },
279
- perWidth: 0.5,
280
- // 阴线颜色
281
- negativeColor: 'green',
282
- // 阳线颜色
283
- masculineColor: 'red',
284
- lineWidth: 1
285
- }
1
+
2
+ /**
3
+ * 基础样式
4
+ *
5
+ * @class jmChartStyle
6
+ * @module jmChart
7
+ * @static
8
+ */
9
+ export default {
10
+ layout: 'normal', // inside 二边不对齐Y轴,内缩一个刻度 | normal
11
+ margin:{
12
+ left: 40,
13
+ top: 20,
14
+ right: 20,
15
+ bottom: 40
16
+ },
17
+ itemLabel: {
18
+ textAlign: 'left',
19
+ textBaseline: 'middle',
20
+ font: '12px Arial',
21
+ fill: '#000'
22
+ },
23
+ // 跟随标线
24
+ markLine: {
25
+ x: true, // 显示X标线
26
+ y: true, // 显示Y标线
27
+ stroke: '#EB792A',
28
+ fill: '#CCC',
29
+ lineWidth: 1,
30
+ radius: 5, // 中间小圆圈大小
31
+ zIndex: 20
32
+ },
33
+ legend: {
34
+ stroke: 'transparent',
35
+ lineWidth: 0,
36
+ margin: {
37
+ left: 10,
38
+ top: 10,
39
+ right: 20,
40
+ bottom: 10
41
+ },
42
+ width: 200,
43
+ height: 0,
44
+ item: {
45
+ shape: {
46
+ width:20,
47
+ height:15
48
+ },
49
+ label: {
50
+ textAlign: 'left',
51
+ textBaseline: 'middle',
52
+ font: '12px Arial',
53
+ fill: '#000'
54
+ },
55
+ normal: {
56
+ fill: 'transparent',
57
+ cursor: 'default'
58
+ },
59
+ hover: {
60
+ fill: '#ccc',
61
+ cursor: 'pointer'
62
+ }
63
+ }
64
+ },
65
+ chartArea: {
66
+ stroke: 'rgb(229,229,229)',
67
+ zIndex: 5
68
+ },
69
+ axis: {
70
+ stroke:'#05468E',
71
+ lineWidth: 1,
72
+ zIndex: 1 ,
73
+ // 显示网格
74
+ grid: {
75
+ x: true, // 是否显示网格
76
+ y: false,
77
+ stroke: 'rgb(229,229,229)',
78
+ lineType: 'dotted', // 虚线,不填为实线
79
+ dashLength: 6, //虚线条间隔,默认5
80
+ lineWidth: 1,
81
+ zIndex: 0
82
+ },
83
+ // 如果标签居中 center,则把二头的标签左边的左对齐,右边的右对齐
84
+ align: 'normal',
85
+ xLabel : {
86
+ count: 5,
87
+ length: 5,
88
+ fill: '#000',
89
+ stroke: '#000',
90
+ margin: {
91
+ left: 0,
92
+ top: 10,
93
+ right: 6,
94
+ bottom: 0
95
+ },
96
+ textAlign: 'center',
97
+ textBaseline: 'top',
98
+ font: '12px Arial',
99
+ zIndex:20,
100
+ // 旋转角度
101
+ rotation: {
102
+ angle: 0,
103
+ point : { x: 0, y: 0 }
104
+ }
105
+ },
106
+ yLabel : {
107
+ count: 5,
108
+ length: 1,
109
+ fill: '#000',
110
+ margin: {
111
+ left: 2,
112
+ top: 6,
113
+ right: 8,
114
+ bottom: 0
115
+ },
116
+ textAlign: 'right',
117
+ textBaseline: 'middle',
118
+ font: '12px Arial',
119
+ zIndex:20,
120
+ // 旋转角度
121
+ rotation: {
122
+ angle: 0,
123
+ point : { x: 0, y: 0 }
124
+ }
125
+ }
126
+ },
127
+ // 图形样式集
128
+ chartColors : [
129
+ '#249FDA','#EA3B7C','#8EBC00','#309B46','#4B507E','#D8E404','#EB792A','#A00DA0'
130
+ ],
131
+ /*tooltip: {
132
+ 'background-color': 'rgb(255,255,255)',
133
+ 'padding':'4px',
134
+ 'opacity':'0.8',
135
+ 'border':'1px solid #000',
136
+ 'box-shadow': '0 0 3px #000',
137
+ 'border-radius': '6px'
138
+ },*/
139
+ line : {
140
+ normal: {
141
+ lineWidth: 1,
142
+ zIndex: 18,
143
+ cursor: 'default'
144
+ },
145
+ hover: {
146
+ lineWidth:4,
147
+ //zIndex: 100,
148
+ cursor: 'pointer'
149
+ },
150
+ lineWidth:1,
151
+ zIndex: 18,
152
+ cursor: 'default',
153
+ radius: 3,
154
+ fill: null,
155
+ showItem: false, // 是否展示圆点
156
+ item: {
157
+ fill: '#fff',
158
+ zIndex: 19
159
+ },
160
+ // 默认不填充,需要填满请配置{fill:'',stroke:''}
161
+ area: false
162
+ },
163
+ stackLine: {
164
+ normal: {
165
+ lineWidth: 1,
166
+ zIndex: 18,
167
+ cursor: 'default'
168
+ },
169
+ hover: {
170
+ lineWidth:4,
171
+ //zIndex: 100,
172
+ cursor: 'pointer'
173
+ },
174
+ lineWidth:1,
175
+ zIndex: 18,
176
+ cursor: 'default',
177
+ radius: 3,
178
+ fill: null,
179
+ showItem: true, // 是否展示圆点
180
+ item: {
181
+ fill: '#fff',
182
+ zIndex: 19
183
+ },
184
+ // 默认不填充,需要填满请配置{fill:'',stroke:''}
185
+ area: false
186
+ },
187
+ bar : {
188
+ normal: {
189
+ lineWidth: 1,
190
+ zIndex: 17,
191
+ cursor: 'default',
192
+ opacity: 0.8
193
+ },
194
+ hover: {
195
+ lineWidth:4,
196
+ //zIndex: 100,
197
+ opacity: 1,
198
+ cursor: 'pointer'
199
+ },
200
+ lineWidth: 1,
201
+ // 柱子宽占比,决定了柱子相对于总宽度
202
+ perWidth: 0.5,
203
+ zIndex: 17,
204
+ cursor: 'default',
205
+ close : true,
206
+ shadow: {
207
+ x: 1,
208
+ y: 1,
209
+ blur: 2,
210
+ color: '#000'
211
+ }
212
+ },
213
+ pie: {
214
+ normal: {
215
+ zIndex: 11,
216
+ cursor: 'default',
217
+ opacity: 0.8
218
+ },
219
+ hover: {
220
+ //zIndex: 100,
221
+ opacity: 1,
222
+ cursor: 'pointer'
223
+ },
224
+ margin: {
225
+ left: 10,
226
+ top: 10,
227
+ right: 10,
228
+ bottom: 10
229
+ },
230
+ lineWidth: 1,
231
+ zIndex: 11,
232
+ cursor: 'default',
233
+ close : true,
234
+ shadow: {
235
+ x: 1,
236
+ y: 1,
237
+ blur: 2,
238
+ color: '#ccc'
239
+ }
240
+ },
241
+ radar: {
242
+ normal: {
243
+ zIndex: 11,
244
+ cursor: 'default',
245
+ opacity: 0.8
246
+ },
247
+ hover: {
248
+ //zIndex: 100,
249
+ opacity: 1,
250
+ cursor: 'pointer'
251
+ },
252
+ margin: {
253
+ left: 10,
254
+ top: 10,
255
+ right: 10,
256
+ bottom: 10
257
+ },
258
+ lineWidth: 1,
259
+ zIndex: 11,
260
+ cursor: 'default',
261
+ close : true,
262
+ shadow: {
263
+ x: 1,
264
+ y: 1,
265
+ blur: 2,
266
+ color: '#ccc'
267
+ }
268
+ },
269
+ candlestick: {
270
+ normal: {
271
+ lineWidth: 1,
272
+ zIndex: 18,
273
+ cursor: 'default'
274
+ },
275
+ hover: {
276
+ //zIndex: 100,
277
+ cursor: 'pointer'
278
+ },
279
+ perWidth: 0.5,
280
+ // 阴线颜色
281
+ negativeColor: 'green',
282
+ // 阳线颜色
283
+ masculineColor: 'red',
284
+ lineWidth: 1
285
+ }
286
286
  }