jmchart 1.1.79 → 1.1.90

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,243 +1,260 @@
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
- opacity: 0.8,
207
- shadow: {
208
- x: 1,
209
- y: 1,
210
- blur: 2,
211
- color: '#000'
212
- }
213
- },
214
- pie: {
215
- normal: {
216
- zIndex: 11,
217
- cursor: 'default',
218
- opacity: 0.8
219
- },
220
- hover: {
221
- //zIndex: 100,
222
- opacity: 1,
223
- cursor: 'pointer'
224
- },
225
- margin: {
226
- left: 10,
227
- top: 10,
228
- right: 10,
229
- bottom: 10
230
- },
231
- lineWidth: 1,
232
- zIndex: 11,
233
- cursor: 'default',
234
- close : true,
235
- opacity: 0.8,
236
- shadow: {
237
- x: 1,
238
- y: 1,
239
- blur: 2,
240
- color: '#ccc'
241
- }
242
- }
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
+ opacity: 0.8,
207
+ shadow: {
208
+ x: 1,
209
+ y: 1,
210
+ blur: 2,
211
+ color: '#000'
212
+ }
213
+ },
214
+ pie: {
215
+ normal: {
216
+ zIndex: 11,
217
+ cursor: 'default',
218
+ opacity: 0.8
219
+ },
220
+ hover: {
221
+ //zIndex: 100,
222
+ opacity: 1,
223
+ cursor: 'pointer'
224
+ },
225
+ margin: {
226
+ left: 10,
227
+ top: 10,
228
+ right: 10,
229
+ bottom: 10
230
+ },
231
+ lineWidth: 1,
232
+ zIndex: 11,
233
+ cursor: 'default',
234
+ close : true,
235
+ opacity: 0.8,
236
+ shadow: {
237
+ x: 1,
238
+ y: 1,
239
+ blur: 2,
240
+ color: '#ccc'
241
+ }
242
+ },
243
+ candlestick: {
244
+ normal: {
245
+ lineWidth: 1,
246
+ zIndex: 18,
247
+ cursor: 'default'
248
+ },
249
+ hover: {
250
+ //zIndex: 100,
251
+ cursor: 'pointer'
252
+ },
253
+ perWidth: 0.5,
254
+ // 阴线颜色
255
+ negativeColor: 'green',
256
+ // 阳线颜色
257
+ masculineColor: 'red',
258
+ lineWidth: 1
259
+ }
243
260
  }