Toggle navigation
折线图splitLine与axisLabel疑问
By
1***0
2019-04-02 09:26:04
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var data = "
O/N
2
3
4
5
6
1W
8
9
10
11
12
13
2W
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1M
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
3M
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
6M
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
9M
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
1Y
3.0470
2.7950
2.7820
2.8350
2.3150
2.9170
2.5790
2.7130
2.3590
2.4030
2.4470
2.4910
2.5350
2.5981
2.6173
2.6364
2.6556
2.6747
2.6939
2.7173
2.7216
2.7259
2.7303
2.7346
2.7389
2.7432
2.7475
2.7518
2.7561
2.7604
2.7648
2.7691
2.7734
2.7777
2.7822
2.7824
2.7827
2.7829
2.7831
2.7833
2.7835
2.7837
2.7840
2.7842
2.7844
2.7846
2.7848
2.7850
2.7853
2.7855
2.7857
2.7859
2.7861
2.7863
2.7866
2.7868
2.7870
2.7872
2.7874
2.7876
2.7879
2.7881
2.7883
2.7885
2.7887
2.7889
2.7892
2.7894
2.7896
2.7898
2.7900
2.7902
2.7905
2.7907
2.7909
2.7911
2.7913
2.7915
2.7918
2.7920
2.7922
2.7924
2.7926
2.7928
2.7931
2.7933
2.7935
2.7937
2.7939
2.7941
2.7944
2.7946
2.7948
2.7954
2.7959
2.7963
2.7968
2.7972
2.7977
2.7981
2.7986
2.7990
2.7994
2.7999
2.8003
2.8008
2.8012
2.8017
2.8021
2.8026
2.8030
2.8034
2.8039
2.8043
2.8048
2.8052
2.8057
2.8061
2.8066
2.8070
2.8074
2.8079
2.8083
2.8088
2.8092
2.8097
2.8101
2.8106
2.8110
2.8114
2.8119
2.8123
2.8128
2.8132
2.8137
2.8141
2.8146
2.8150
2.8154
2.8159
2.8163
2.8168
2.8172
2.8177
2.8181
2.8186
2.8190
2.8194
2.8199
2.8203
2.8208
2.8212
2.8217
2.8221
2.8226
2.8230
2.8234
2.8239
2.8243
2.8248
2.8252
2.8257
2.8261
2.8266
2.8270
2.8274
2.8279
2.8283
2.8288
2.8292
2.8297
2.8301
2.8306
2.8310
2.8314
2.8319
2.8323
2.8328
2.8332
2.8337
2.8341
2.8346
2.8359
2.8368
2.8377
2.8386
2.8396
2.8405
2.8414
2.8423
2.8432
2.8441
2.8450
2.8459
2.8468
2.8478
2.8487
2.8496
2.8505
2.8514
2.8523
2.8532
2.8541
2.8550
2.8560
2.8569
2.8578
2.8587
2.8596
2.8605
2.8614
2.8623
2.8632
2.8642
2.8651
2.8660
2.8669
2.8678
2.8687
2.8696
2.8705
2.8714
2.8724
2.8733
2.8742
2.8751
2.8760
2.8769
2.8778
2.8787
2.8796
2.8806
2.8815
2.8824
2.8833
2.8842
2.8851
2.8860
2.8869
2.8878
2.8888
2.8897
2.8906
2.8915
2.8924
2.8933
2.8942
2.8951
2.8960
2.8970
2.8979
2.8988
2.8997
2.9006
2.9015
2.9024
2.9033
2.9042
2.9052
2.9061
2.9070
2.9079
2.9088
2.9097
2.9106
2.9115
2.9124
2.9134
2.9143
2.9152
2.9161
2.9184
2.9199
2.9213
2.9228
2.9242
2.9257
2.9271
2.9286
2.9300
2.9314
2.9329
2.9343
2.9358
2.9372
2.9387
2.9401
2.9416
2.9430
2.9444
2.9459
2.9473
2.9488
2.9502
2.9517
2.9531
2.9546
2.9560
2.9574
2.9589
2.9603
2.9618
2.9632
2.9647
2.9661
2.9676
2.9690
2.9704
2.9719
2.9733
2.9748
2.9762
2.9777
2.9791
2.9806
2.9820
2.9834
2.9849
2.9863
2.9878
2.9892
2.9907
2.9921
2.9936
2.9950
2.9964
2.9979
2.9993
3.0008
3.0022
3.0037
3.0051
3.0066
3.0080
3.0094
3.0109
3.0123
3.0138
3.0152
3.0167
3.0181
3.0196
3.0210
3.0224
3.0239
3.0253
3.0268
3.0282
3.0297
3.0311
3.0326
3.0340
3.0354
3.0369
3.0383
3.0398
3.0412
3.0427
3.0441
3.0456
" var chartData = { xLabel: [], xLabelShow: [], value: [] }; $(data).find('xaxis').each(function() { $(this).find('value').each(function() { var $this = $(this); chartData.xLabel.push($this.text()); if ($this.attr('show')) { chartData.xLabelShow.push($this.text()); } }); }); $(data).find('graph:eq(0)').each(function() { $(this).find('value').each(function() { chartData['value'][$(this).attr('xid')] = $(this).text(); }) }); console.log(chartData); option = { title: { text: '曲线title', x: 'center' }, tooltip: { show: true, trigger: 'axis', axisPointer: { type: 'line', axis: 'x' } }, //水印 graphic: { type: 'text', style: { text: 'chinamoney', font: '1em "Arial,Helvetica",sans-serif', fill: '#666' }, right: '20%', bottom: '20%' }, grid: { show: true, left: '10%', right: '10%' }, xAxis: { type: 'category', data: chartData['xLabel'], name: '期限', nameLocation: 'end', boundaryGap: false, axisLine: { show: true, onZero: false }, axisTick: { show: false, alignWidthLabel: true, }, boundaryGap: true, //x坐标轴标签展示 axisLabel: { show: true, interval: function(index, name) { if (chartData['xLabelShow'].indexOf(name) >= 0) { return true; } }, showMinLabel: true, showMaxLabel: true, align: 'center' }, //x轴分割线展示 splitLine: { show: true, interval: function(index, name) { if (chartData['xLabelShow'].indexOf(name) >= 0) { return true; } } }, scale: true }, yAxis: { type: 'value', boundaryGap: false, //坐标轴线 axisLine: { show: true, onZero: false }, //刻度 axisTick: { show: false, alignWidthLabel: true, }, axisLabel: { formatter: function(value, index) { return value.toFixed(4); } }, splitLine: { show: true }, name: '%', nameLocation: 'end', //boundaryGap:true, scale: true, //取消从0开始 }, series: [{ type: 'line', name: 'example', data: chartData['value'], symbol: 'none', connnectNulls: true, }] }