tvcharts 0.6.11 → 0.6.13
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.
- package/dist/echarts.js +868 -114
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/bgColor/BgColorView.js +4 -1
- package/lib/chart/helper/Symbol.js +55 -12
- package/lib/chart/helper/SymbolDraw.js +2 -1
- package/lib/chart/labels/LabelsSeries.js +109 -0
- package/lib/chart/labels/LabelsView.js +133 -0
- package/lib/chart/labels/install.js +55 -0
- package/lib/chart/labels/labelsVisual.js +128 -0
- package/lib/chart/labels.js +46 -0
- package/lib/chart/linesPlot/LinesPlotSeries.js +2 -26
- package/lib/chart/linesPlot/LinesPlotView.js +52 -34
- package/lib/chart/linesPlot/SymbolPath.js +88 -0
- package/lib/chart/linesPlot/linesPlotLayout.js +58 -32
- package/lib/chart/scatter/ScatterView.js +2 -1
- package/lib/export/charts.js +1 -0
- package/lib/model/Global.js +1 -0
- package/lib/util/symbol.js +597 -1
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/echarts.d.ts +5 -6
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +11 -10
- package/types/src/chart/helper/Symbol.d.ts +1 -0
- package/types/src/chart/helper/SymbolDraw.d.ts +1 -0
- package/types/src/chart/labels/LabelsSeries.d.ts +37 -0
- package/types/src/chart/labels/LabelsView.d.ts +28 -0
- package/types/src/chart/labels/install.d.ts +2 -0
- package/types/src/chart/labels/labelsVisual.d.ts +3 -0
- package/types/src/chart/labels.d.ts +1 -0
- package/types/src/chart/linesPlot/LinesPlotSeries.d.ts +6 -7
- package/types/src/chart/linesPlot/SymbolPath.d.ts +24 -0
- package/types/src/chart/linesPlot/linesPlotLayout.d.ts +1 -1
- package/types/src/export/charts.d.ts +1 -0
package/lib/util/symbol.js
CHANGED
|
@@ -188,6 +188,443 @@ var Cross = graphic.Path.extend({
|
|
|
188
188
|
ctx.closePath();
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
|
+
var LabelDown = graphic.Path.extend({
|
|
192
|
+
type: 'labelDown',
|
|
193
|
+
shape: {
|
|
194
|
+
x: 0,
|
|
195
|
+
y: 0,
|
|
196
|
+
width: 0,
|
|
197
|
+
height: 0,
|
|
198
|
+
r: 0
|
|
199
|
+
},
|
|
200
|
+
buildPath: function (ctx, shape) {
|
|
201
|
+
var x = shape.x,
|
|
202
|
+
y = shape.y,
|
|
203
|
+
width = shape.width,
|
|
204
|
+
height = shape.height,
|
|
205
|
+
r = shape.r;
|
|
206
|
+
var triangleHeight = 6;
|
|
207
|
+
var triangleWidth = 6;
|
|
208
|
+
ctx.moveTo(x + r, y);
|
|
209
|
+
ctx.lineTo(x + width - r, y);
|
|
210
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
211
|
+
ctx.lineTo(x + width, y + height - r);
|
|
212
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
213
|
+
ctx.lineTo(x + width / 2 + triangleWidth, y + height);
|
|
214
|
+
ctx.lineTo(x + width / 2, y + height + triangleHeight);
|
|
215
|
+
ctx.lineTo(x + width / 2 - triangleWidth, y + height);
|
|
216
|
+
ctx.lineTo(x + r, y + height);
|
|
217
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
218
|
+
ctx.lineTo(x, y + r);
|
|
219
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
var LabelUp = graphic.Path.extend({
|
|
223
|
+
type: 'labelUp',
|
|
224
|
+
shape: {
|
|
225
|
+
x: 0,
|
|
226
|
+
y: 0,
|
|
227
|
+
width: 0,
|
|
228
|
+
height: 0,
|
|
229
|
+
r: 0
|
|
230
|
+
},
|
|
231
|
+
buildPath: function (ctx, shape) {
|
|
232
|
+
var x = shape.x,
|
|
233
|
+
y = shape.y,
|
|
234
|
+
width = shape.width,
|
|
235
|
+
height = shape.height,
|
|
236
|
+
r = shape.r;
|
|
237
|
+
var triangleHeight = 6;
|
|
238
|
+
var triangleWidth = 6;
|
|
239
|
+
ctx.moveTo(x + r, y);
|
|
240
|
+
ctx.lineTo(x + width / 2 - triangleWidth, y);
|
|
241
|
+
ctx.lineTo(x + width / 2, y - triangleHeight);
|
|
242
|
+
ctx.lineTo(x + width / 2 + triangleWidth, y);
|
|
243
|
+
ctx.lineTo(x + width - r, y);
|
|
244
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
245
|
+
ctx.lineTo(x + width, y + height - r);
|
|
246
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
247
|
+
ctx.lineTo(x + r, y + height);
|
|
248
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
249
|
+
ctx.lineTo(x, y + r);
|
|
250
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
var LabelLeft = graphic.Path.extend({
|
|
254
|
+
type: 'labelLeft',
|
|
255
|
+
shape: {
|
|
256
|
+
x: 0,
|
|
257
|
+
y: 0,
|
|
258
|
+
width: 0,
|
|
259
|
+
height: 0,
|
|
260
|
+
r: 0
|
|
261
|
+
},
|
|
262
|
+
buildPath: function (ctx, shape) {
|
|
263
|
+
var x = shape.x,
|
|
264
|
+
y = shape.y,
|
|
265
|
+
width = shape.width,
|
|
266
|
+
height = shape.height,
|
|
267
|
+
r = shape.r;
|
|
268
|
+
var triangleHeight = 6;
|
|
269
|
+
var triangleWidth = 6;
|
|
270
|
+
ctx.moveTo(x + r, y);
|
|
271
|
+
ctx.lineTo(x + width - r, y);
|
|
272
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
273
|
+
ctx.lineTo(x + width, y + height - r);
|
|
274
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
275
|
+
ctx.lineTo(x + r, y + height);
|
|
276
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
277
|
+
ctx.lineTo(x, y + height / 2 + triangleWidth);
|
|
278
|
+
ctx.lineTo(x - triangleHeight, y + height / 2);
|
|
279
|
+
ctx.lineTo(x, y + height / 2 - triangleWidth);
|
|
280
|
+
ctx.lineTo(x, y + r);
|
|
281
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
var LabelRight = graphic.Path.extend({
|
|
285
|
+
type: 'labelRight',
|
|
286
|
+
shape: {
|
|
287
|
+
x: 0,
|
|
288
|
+
y: 0,
|
|
289
|
+
width: 0,
|
|
290
|
+
height: 0,
|
|
291
|
+
r: 0
|
|
292
|
+
},
|
|
293
|
+
buildPath: function (ctx, shape) {
|
|
294
|
+
var x = shape.x,
|
|
295
|
+
y = shape.y,
|
|
296
|
+
width = shape.width,
|
|
297
|
+
height = shape.height,
|
|
298
|
+
r = shape.r;
|
|
299
|
+
var triangleHeight = 6;
|
|
300
|
+
var triangleWidth = 6;
|
|
301
|
+
ctx.moveTo(x + r, y);
|
|
302
|
+
ctx.lineTo(x + width - r, y);
|
|
303
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
304
|
+
ctx.lineTo(x + width, y + height / 2 - triangleWidth);
|
|
305
|
+
ctx.lineTo(x + width + triangleHeight, y + height / 2);
|
|
306
|
+
ctx.lineTo(x + width, y + height / 2 + triangleWidth);
|
|
307
|
+
ctx.lineTo(x + width, y + height - r);
|
|
308
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
309
|
+
ctx.lineTo(x + r, y + height);
|
|
310
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
311
|
+
ctx.lineTo(x, y + r);
|
|
312
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
var LabelLowerLeft = graphic.Path.extend({
|
|
316
|
+
type: 'labelLowerLeft',
|
|
317
|
+
shape: {
|
|
318
|
+
x: 0,
|
|
319
|
+
y: 0,
|
|
320
|
+
width: 0,
|
|
321
|
+
height: 0,
|
|
322
|
+
r: 0,
|
|
323
|
+
offsetY: 0,
|
|
324
|
+
offsetX: 0,
|
|
325
|
+
offsetWidth: 0
|
|
326
|
+
},
|
|
327
|
+
buildPath: function (ctx, shape) {
|
|
328
|
+
// const { x, y, width, height, r } = shape;
|
|
329
|
+
var height = shape.height;
|
|
330
|
+
var width = shape.width;
|
|
331
|
+
var x = shape.x;
|
|
332
|
+
var y = shape.y;
|
|
333
|
+
var r = shape.r;
|
|
334
|
+
var offsetY = shape.offsetY;
|
|
335
|
+
var offsetX = shape.offsetX;
|
|
336
|
+
var offsetWidth = shape.offsetWidth;
|
|
337
|
+
ctx.moveTo(x + r, y);
|
|
338
|
+
ctx.lineTo(x + width - r, y);
|
|
339
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
340
|
+
ctx.lineTo(x + width, y + height - r);
|
|
341
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
342
|
+
ctx.lineTo(x + r, y + height);
|
|
343
|
+
// ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
344
|
+
ctx.lineTo(x - offsetWidth, y + height + offsetY);
|
|
345
|
+
ctx.lineTo(x, y + height - offsetX);
|
|
346
|
+
ctx.lineTo(x, y + r);
|
|
347
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
var LabelLowerRight = graphic.Path.extend({
|
|
351
|
+
type: 'labelLowerRight',
|
|
352
|
+
shape: {
|
|
353
|
+
x: 0,
|
|
354
|
+
y: 0,
|
|
355
|
+
width: 0,
|
|
356
|
+
height: 0,
|
|
357
|
+
r: 0,
|
|
358
|
+
offsetY: 0,
|
|
359
|
+
offsetX: 0,
|
|
360
|
+
offsetWidth: 0
|
|
361
|
+
},
|
|
362
|
+
buildPath: function (ctx, shape) {
|
|
363
|
+
// const { x, y, width, height, r } = shape;
|
|
364
|
+
var offsetY = shape.offsetY;
|
|
365
|
+
var offsetX = shape.offsetX;
|
|
366
|
+
var offsetWidth = shape.offsetWidth;
|
|
367
|
+
var height = shape.height;
|
|
368
|
+
var width = shape.width;
|
|
369
|
+
var x = shape.x;
|
|
370
|
+
var y = shape.y;
|
|
371
|
+
var r = shape.r;
|
|
372
|
+
ctx.moveTo(x + r, y);
|
|
373
|
+
ctx.lineTo(x + width - r, y);
|
|
374
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
375
|
+
// ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
376
|
+
ctx.lineTo(x + width, y + height - offsetWidth);
|
|
377
|
+
ctx.lineTo(x + width + offsetX, y + height + offsetY);
|
|
378
|
+
ctx.lineTo(x + width - r, y + height);
|
|
379
|
+
ctx.lineTo(x + r, y + height);
|
|
380
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
381
|
+
ctx.lineTo(x, y + r);
|
|
382
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
var LabelUpperLeft = graphic.Path.extend({
|
|
386
|
+
type: 'labelUpperLeft',
|
|
387
|
+
shape: {
|
|
388
|
+
x: 0,
|
|
389
|
+
y: 0,
|
|
390
|
+
width: 0,
|
|
391
|
+
height: 0,
|
|
392
|
+
r: 0,
|
|
393
|
+
offsetY: 0,
|
|
394
|
+
offsetX: 0,
|
|
395
|
+
offsetWidth: 0
|
|
396
|
+
},
|
|
397
|
+
buildPath: function (ctx, shape) {
|
|
398
|
+
var height = shape.height;
|
|
399
|
+
var width = shape.width;
|
|
400
|
+
var x = shape.x;
|
|
401
|
+
var y = shape.y;
|
|
402
|
+
var r = shape.r;
|
|
403
|
+
var offsetY = shape.offsetY;
|
|
404
|
+
var offsetX = shape.offsetX;
|
|
405
|
+
var offsetWidth = shape.offsetWidth;
|
|
406
|
+
ctx.moveTo(x + r, y);
|
|
407
|
+
ctx.lineTo(x + width - r, y);
|
|
408
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
409
|
+
ctx.lineTo(x + width, y + height - r);
|
|
410
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
411
|
+
ctx.lineTo(x + r, y + height);
|
|
412
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
413
|
+
ctx.lineTo(x, y + offsetWidth);
|
|
414
|
+
// ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
415
|
+
ctx.lineTo(x - offsetX, y - offsetY);
|
|
416
|
+
ctx.lineTo(x + r, y);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
var LabelUpperRight = graphic.Path.extend({
|
|
420
|
+
type: 'labelUpperRight',
|
|
421
|
+
shape: {
|
|
422
|
+
x: 0,
|
|
423
|
+
y: 0,
|
|
424
|
+
width: 0,
|
|
425
|
+
height: 0,
|
|
426
|
+
r: 0,
|
|
427
|
+
offsetY: 0,
|
|
428
|
+
offsetX: 0,
|
|
429
|
+
offsetWidth: 0
|
|
430
|
+
},
|
|
431
|
+
buildPath: function (ctx, shape) {
|
|
432
|
+
var height = shape.height;
|
|
433
|
+
var width = shape.width;
|
|
434
|
+
var x = shape.x;
|
|
435
|
+
var y = shape.y;
|
|
436
|
+
var r = shape.r;
|
|
437
|
+
var offsetY = shape.offsetY;
|
|
438
|
+
var offsetX = shape.offsetX;
|
|
439
|
+
var offsetWidth = shape.offsetWidth;
|
|
440
|
+
ctx.moveTo(x + r, y);
|
|
441
|
+
ctx.lineTo(x + width - r, y);
|
|
442
|
+
ctx.lineTo(x + width + offsetX, y - offsetY);
|
|
443
|
+
ctx.lineTo(x + width, y + offsetWidth);
|
|
444
|
+
// ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
445
|
+
ctx.lineTo(x + width, y + height - r);
|
|
446
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
447
|
+
ctx.lineTo(x + r, y + height);
|
|
448
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
449
|
+
ctx.lineTo(x, y);
|
|
450
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
var LabelCenter = graphic.Path.extend({
|
|
454
|
+
type: 'labelCenter',
|
|
455
|
+
shape: {
|
|
456
|
+
x: 0,
|
|
457
|
+
y: 0,
|
|
458
|
+
width: 0,
|
|
459
|
+
height: 0,
|
|
460
|
+
r: 0
|
|
461
|
+
},
|
|
462
|
+
buildPath: function (ctx, shape) {
|
|
463
|
+
var height = shape.height;
|
|
464
|
+
var width = shape.width;
|
|
465
|
+
var x = shape.x;
|
|
466
|
+
var y = shape.y;
|
|
467
|
+
var r = shape.r;
|
|
468
|
+
ctx.moveTo(x + r, y);
|
|
469
|
+
ctx.lineTo(x + width - r, y);
|
|
470
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
471
|
+
ctx.lineTo(x + width, y + height - r);
|
|
472
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
473
|
+
ctx.lineTo(x + r, y + height);
|
|
474
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
475
|
+
ctx.lineTo(x, y);
|
|
476
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
var XCross = graphic.Path.extend({
|
|
480
|
+
type: 'xCross',
|
|
481
|
+
shape: {
|
|
482
|
+
x: 0,
|
|
483
|
+
y: 0,
|
|
484
|
+
width: 0,
|
|
485
|
+
height: 0
|
|
486
|
+
},
|
|
487
|
+
buildPath: function (ctx, shape) {
|
|
488
|
+
var x = shape.x,
|
|
489
|
+
y = shape.y;
|
|
490
|
+
var width = shape.width / 2;
|
|
491
|
+
var height = shape.height / 2;
|
|
492
|
+
// const lineWidth = 0.2;
|
|
493
|
+
ctx.moveTo(x + width, y - height);
|
|
494
|
+
ctx.lineTo(x - width, y + height);
|
|
495
|
+
// ctx.lineTo(x - width + lineWidth, y + height);
|
|
496
|
+
// ctx.lineTo(x + width + lineWidth, y - height);
|
|
497
|
+
// ctx.lineTo(x + width, y - height);
|
|
498
|
+
ctx.moveTo(x - width, y - height);
|
|
499
|
+
ctx.lineTo(x + width, y + height);
|
|
500
|
+
// ctx.lineTo(x + width + lineWidth, y + height);
|
|
501
|
+
// ctx.lineTo(x - width + lineWidth, y - height);
|
|
502
|
+
// ctx.lineTo(x - width, y - height);
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
var LCross = graphic.Path.extend({
|
|
507
|
+
type: 'lCross',
|
|
508
|
+
shape: {
|
|
509
|
+
x: 0,
|
|
510
|
+
y: 0,
|
|
511
|
+
width: 0,
|
|
512
|
+
height: 0
|
|
513
|
+
},
|
|
514
|
+
buildPath: function (ctx, shape) {
|
|
515
|
+
var x = shape.x,
|
|
516
|
+
y = shape.y;
|
|
517
|
+
var width = shape.width / 2;
|
|
518
|
+
var height = shape.height / 2;
|
|
519
|
+
ctx.moveTo(x, y - height);
|
|
520
|
+
ctx.lineTo(x, y + height);
|
|
521
|
+
ctx.moveTo(x - width, y);
|
|
522
|
+
ctx.lineTo(x + width, y);
|
|
523
|
+
// ctx.lineTo(x + width + lineWidth, y + height);
|
|
524
|
+
// ctx.lineTo(x - width + lineWidth, y - height);
|
|
525
|
+
// ctx.lineTo(x - width, y - height);
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
var Flag = graphic.Path.extend({
|
|
530
|
+
type: 'flag',
|
|
531
|
+
shape: {
|
|
532
|
+
x: 0,
|
|
533
|
+
y: 0,
|
|
534
|
+
width: 0,
|
|
535
|
+
height: 0
|
|
536
|
+
},
|
|
537
|
+
buildPath: function (ctx, shape) {
|
|
538
|
+
var x = shape.x,
|
|
539
|
+
y = shape.y;
|
|
540
|
+
var width = shape.width / 2;
|
|
541
|
+
var height = shape.height / 2;
|
|
542
|
+
var rectWidth = 0.2;
|
|
543
|
+
var range = 0.4;
|
|
544
|
+
var rangeHeight = 0.8;
|
|
545
|
+
var startX = x - width + rectWidth;
|
|
546
|
+
var endX = x + width;
|
|
547
|
+
var topY = y - height;
|
|
548
|
+
var bottomY = y + height;
|
|
549
|
+
ctx.moveTo(x - width, topY);
|
|
550
|
+
ctx.lineTo(startX, topY);
|
|
551
|
+
ctx.bezierCurveTo(startX + 1 / 3 * shape.width, topY - range, startX + 2 / 3 * shape.width, topY + range, endX, topY);
|
|
552
|
+
ctx.lineTo(endX, topY + rangeHeight);
|
|
553
|
+
ctx.bezierCurveTo(startX + 2 / 3 * shape.width, topY + range + rangeHeight, startX + 1 / 3 * shape.width, topY - range + rangeHeight, startX, topY + rangeHeight);
|
|
554
|
+
ctx.lineTo(startX, bottomY);
|
|
555
|
+
ctx.lineTo(x - width, bottomY);
|
|
556
|
+
ctx.lineTo(x - width, topY);
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
var TriangleDown = graphic.Path.extend({
|
|
560
|
+
type: 'triangleDown',
|
|
561
|
+
shape: {
|
|
562
|
+
cx: 0,
|
|
563
|
+
cy: 0,
|
|
564
|
+
width: 0,
|
|
565
|
+
height: 0
|
|
566
|
+
},
|
|
567
|
+
buildPath: function (path, shape) {
|
|
568
|
+
var cx = shape.cx;
|
|
569
|
+
var cy = shape.cy;
|
|
570
|
+
var width = shape.width / 2;
|
|
571
|
+
var height = shape.height / 2;
|
|
572
|
+
path.moveTo(cx, cy + height);
|
|
573
|
+
path.lineTo(cx + width, cy - height);
|
|
574
|
+
path.lineTo(cx - width, cy - height);
|
|
575
|
+
path.closePath();
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
var ArrowUp = graphic.Path.extend({
|
|
579
|
+
type: 'arrowUp',
|
|
580
|
+
shape: {
|
|
581
|
+
cx: 0,
|
|
582
|
+
cy: 0,
|
|
583
|
+
width: 0,
|
|
584
|
+
height: 0
|
|
585
|
+
},
|
|
586
|
+
buildPath: function (ctx, shape) {
|
|
587
|
+
var cx = shape.cx,
|
|
588
|
+
cy = shape.cy;
|
|
589
|
+
var rectWidth = 8;
|
|
590
|
+
var width = shape.width / 2;
|
|
591
|
+
var height = shape.height / 2;
|
|
592
|
+
var triangleY = cy - 2;
|
|
593
|
+
ctx.moveTo(cx, cy - height);
|
|
594
|
+
ctx.lineTo(cx + width, triangleY);
|
|
595
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
596
|
+
ctx.lineTo(cx + width - rectWidth, cy + height);
|
|
597
|
+
ctx.lineTo(cx - width + rectWidth, cy + height);
|
|
598
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
599
|
+
ctx.lineTo(cx - width, triangleY);
|
|
600
|
+
ctx.closePath();
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
var ArrowDown = graphic.Path.extend({
|
|
604
|
+
type: 'arrowDown',
|
|
605
|
+
shape: {
|
|
606
|
+
cx: 0,
|
|
607
|
+
cy: 0,
|
|
608
|
+
width: 0,
|
|
609
|
+
height: 0
|
|
610
|
+
},
|
|
611
|
+
buildPath: function (ctx, shape) {
|
|
612
|
+
var cx = shape.cx,
|
|
613
|
+
cy = shape.cy;
|
|
614
|
+
var rectWidth = 8;
|
|
615
|
+
var width = shape.width / 2;
|
|
616
|
+
var height = shape.height / 2;
|
|
617
|
+
var triangleY = cy + 2;
|
|
618
|
+
ctx.moveTo(cx, cy + height);
|
|
619
|
+
ctx.lineTo(cx + width, triangleY);
|
|
620
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
621
|
+
ctx.lineTo(cx + width - rectWidth, cy - height);
|
|
622
|
+
ctx.lineTo(cx - width + rectWidth, cy - height);
|
|
623
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
624
|
+
ctx.lineTo(cx - width, triangleY);
|
|
625
|
+
ctx.closePath();
|
|
626
|
+
}
|
|
627
|
+
});
|
|
191
628
|
/**
|
|
192
629
|
* Map of path constructors
|
|
193
630
|
*/
|
|
@@ -202,8 +639,30 @@ var symbolCtors = {
|
|
|
202
639
|
pin: Pin,
|
|
203
640
|
arrow: Arrow,
|
|
204
641
|
triangle: Triangle,
|
|
205
|
-
cross: Cross
|
|
642
|
+
cross: Cross,
|
|
643
|
+
labelCenter: LabelCenter,
|
|
644
|
+
labelDown: LabelDown,
|
|
645
|
+
labelUp: LabelUp,
|
|
646
|
+
labelLeft: LabelLeft,
|
|
647
|
+
labelRight: LabelRight,
|
|
648
|
+
labelLowerLeft: LabelLowerLeft,
|
|
649
|
+
labelLowerRight: LabelLowerRight,
|
|
650
|
+
labelUpperLeft: LabelUpperLeft,
|
|
651
|
+
labelUpperRight: LabelUpperRight,
|
|
652
|
+
xCross: XCross,
|
|
653
|
+
lCross: LCross,
|
|
654
|
+
arrowUp: ArrowUp,
|
|
655
|
+
flag: Flag,
|
|
656
|
+
triangleDown: TriangleDown,
|
|
657
|
+
arrowDown: ArrowDown
|
|
206
658
|
};
|
|
659
|
+
// const labelShapeMakers: SymbolShapeMaker = function (x, y, w, h, shape: graphic.Rect['shape']) {
|
|
660
|
+
// shape.x = x;
|
|
661
|
+
// shape.y = y;
|
|
662
|
+
// shape.width = w;
|
|
663
|
+
// shape.height = h;
|
|
664
|
+
// shape.r = w / 10;
|
|
665
|
+
// };
|
|
207
666
|
var symbolShapeMakers = {
|
|
208
667
|
line: function (x, y, w, h, shape) {
|
|
209
668
|
shape.x1 = x;
|
|
@@ -266,6 +725,143 @@ var symbolShapeMakers = {
|
|
|
266
725
|
shape.y = y + h / 2;
|
|
267
726
|
shape.width = w;
|
|
268
727
|
shape.height = h;
|
|
728
|
+
},
|
|
729
|
+
labelCenter: function (x, y, w, h, shape) {
|
|
730
|
+
var r = 2;
|
|
731
|
+
var offset = 1;
|
|
732
|
+
shape.x = x - w / 2 + offset;
|
|
733
|
+
shape.y = y - h;
|
|
734
|
+
shape.width = w;
|
|
735
|
+
shape.height = h;
|
|
736
|
+
shape.r = r;
|
|
737
|
+
},
|
|
738
|
+
labelDown: function (x, y, w, h, shape) {
|
|
739
|
+
var triangleWidth = 6;
|
|
740
|
+
var r = 2;
|
|
741
|
+
var offset = 1;
|
|
742
|
+
shape.x = x - w / 2 + offset;
|
|
743
|
+
shape.y = y - h - triangleWidth;
|
|
744
|
+
shape.width = w;
|
|
745
|
+
shape.height = h;
|
|
746
|
+
shape.r = r;
|
|
747
|
+
},
|
|
748
|
+
labelUp: function (x, y, w, h, shape) {
|
|
749
|
+
var triangleWidth = 6;
|
|
750
|
+
var r = 2;
|
|
751
|
+
var offset = 1;
|
|
752
|
+
shape.x = x - w / 2 + offset;
|
|
753
|
+
shape.y = y - h;
|
|
754
|
+
shape.width = w;
|
|
755
|
+
shape.height = h;
|
|
756
|
+
shape.r = r;
|
|
757
|
+
},
|
|
758
|
+
labelLeft: function (x, y, w, h, shape) {
|
|
759
|
+
var triangleWidth = 6;
|
|
760
|
+
var r = 2;
|
|
761
|
+
shape.x = x + triangleWidth;
|
|
762
|
+
shape.y = y - h;
|
|
763
|
+
shape.width = w;
|
|
764
|
+
shape.height = h;
|
|
765
|
+
shape.r = r;
|
|
766
|
+
},
|
|
767
|
+
labelRight: function (x, y, w, h, shape) {
|
|
768
|
+
var triangleWidth = 6;
|
|
769
|
+
var r = 2;
|
|
770
|
+
shape.x = x - w - triangleWidth;
|
|
771
|
+
shape.y = y - h;
|
|
772
|
+
shape.width = w;
|
|
773
|
+
shape.height = h;
|
|
774
|
+
shape.r = r;
|
|
775
|
+
},
|
|
776
|
+
labelLowerLeft: function (x, y, w, h, shape) {
|
|
777
|
+
var offsetY = 8;
|
|
778
|
+
var offsetX = 8;
|
|
779
|
+
var offsetWidth = 6;
|
|
780
|
+
shape.x = x + offsetX;
|
|
781
|
+
shape.y = y - h - offsetY;
|
|
782
|
+
shape.width = w;
|
|
783
|
+
shape.height = h;
|
|
784
|
+
shape.r = 2;
|
|
785
|
+
shape.offsetY = offsetY;
|
|
786
|
+
shape.offsetX = offsetX;
|
|
787
|
+
shape.offsetWidth = offsetWidth;
|
|
788
|
+
},
|
|
789
|
+
labelLowerRight: function (x, y, w, h, shape) {
|
|
790
|
+
// const r = 2;
|
|
791
|
+
var offsetY = 8;
|
|
792
|
+
var offsetX = 8;
|
|
793
|
+
var offsetWidth = 6;
|
|
794
|
+
shape.x = x - w - offsetX;
|
|
795
|
+
shape.y = y - h - offsetY;
|
|
796
|
+
shape.width = w;
|
|
797
|
+
shape.height = h;
|
|
798
|
+
shape.r = 2;
|
|
799
|
+
shape.offsetY = offsetY;
|
|
800
|
+
shape.offsetX = offsetX;
|
|
801
|
+
shape.offsetWidth = offsetWidth;
|
|
802
|
+
},
|
|
803
|
+
labelUpperLeft: function (x, y, w, h, shape) {
|
|
804
|
+
var offsetY = 8;
|
|
805
|
+
var offsetX = 8;
|
|
806
|
+
var offsetWidth = 6;
|
|
807
|
+
shape.x = x + offsetX;
|
|
808
|
+
shape.y = y - h - offsetY;
|
|
809
|
+
shape.width = w;
|
|
810
|
+
shape.height = h;
|
|
811
|
+
shape.r = 2;
|
|
812
|
+
shape.offsetY = offsetY;
|
|
813
|
+
shape.offsetX = offsetX;
|
|
814
|
+
shape.offsetWidth = offsetWidth;
|
|
815
|
+
},
|
|
816
|
+
labelUpperRight: function (x, y, w, h, shape) {
|
|
817
|
+
var offsetY = 8;
|
|
818
|
+
var offsetX = 8;
|
|
819
|
+
var offsetWidth = 6;
|
|
820
|
+
shape.x = x - w - offsetX;
|
|
821
|
+
shape.y = y - h;
|
|
822
|
+
shape.width = w;
|
|
823
|
+
shape.height = h;
|
|
824
|
+
shape.r = 2;
|
|
825
|
+
shape.offsetY = offsetY;
|
|
826
|
+
shape.offsetX = offsetX;
|
|
827
|
+
shape.offsetWidth = offsetWidth;
|
|
828
|
+
},
|
|
829
|
+
xCross: function (x, y, w, h, shape) {
|
|
830
|
+
shape.x = x + w / 2;
|
|
831
|
+
;
|
|
832
|
+
shape.y = y;
|
|
833
|
+
shape.width = w;
|
|
834
|
+
shape.height = h;
|
|
835
|
+
},
|
|
836
|
+
lCross: function (x, y, w, h, shape) {
|
|
837
|
+
shape.x = x + w / 2;
|
|
838
|
+
shape.y = y;
|
|
839
|
+
shape.width = w;
|
|
840
|
+
shape.height = h;
|
|
841
|
+
},
|
|
842
|
+
flag: function (x, y, w, h, shape) {
|
|
843
|
+
shape.x = x + w / 2;
|
|
844
|
+
shape.y = y;
|
|
845
|
+
shape.width = w;
|
|
846
|
+
shape.height = h;
|
|
847
|
+
},
|
|
848
|
+
triangleDown: function (x, y, w, h, shape) {
|
|
849
|
+
shape.cx = x + w / 2;
|
|
850
|
+
shape.cy = y + h / 2;
|
|
851
|
+
shape.width = w;
|
|
852
|
+
shape.height = h;
|
|
853
|
+
},
|
|
854
|
+
arrowUp: function (x, y, w, h, shape) {
|
|
855
|
+
shape.cx = x;
|
|
856
|
+
shape.cy = y - h / 2;
|
|
857
|
+
shape.width = w;
|
|
858
|
+
shape.height = h;
|
|
859
|
+
},
|
|
860
|
+
arrowDown: function (x, y, w, h, shape) {
|
|
861
|
+
shape.cx = x;
|
|
862
|
+
shape.cy = y - h / 2;
|
|
863
|
+
shape.width = w;
|
|
864
|
+
shape.height = h;
|
|
269
865
|
}
|
|
270
866
|
};
|
|
271
867
|
export var symbolBuildProxies = {};
|
package/package.json
CHANGED
package/types/dist/charts.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { install$1 as BarChart, BarSeriesOption, install$
|
|
1
|
+
export { install$1 as BarChart, BarSeriesOption, install$20 as BgColorChart, install$13 as BoxplotChart, BoxplotSeriesOption, install$14 as CandlestickChart, CandlestickSeriesOption, install$25 as CustomChart, CustomSeriesOption, install$15 as EffectScatterChart, EffectScatterSeriesOption, install$10 as FunnelChart, FunnelSeriesOption, install$9 as GaugeChart, GaugeSeriesOption, install$8 as GraphChart, GraphSeriesOption, install$19 as HLinesChart, install$21 as HeatmapChart, HeatmapSeriesOption, install$18 as LabelsChart, install as LineChart, LineSeriesOption, install$16 as LinesChart, install$17 as LinesPlotChart, LinesPlotSeriesOption, LinesSeriesOption, install$5 as MapChart, MapSeriesOption, install$11 as ParallelChart, ParallelSeriesOption, install$22 as PictorialBarChart, PictorialBarSeriesOption, install$2 as PieChart, PieSeriesOption, install$4 as RadarChart, RadarSeriesOption, install$12 as SankeyChart, SankeySeriesOption, install$3 as ScatterChart, ScatterSeriesOption, install$24 as SunburstChart, SunburstSeriesOption, install$23 as ThemeRiverChart, ThemeRiverSeriesOption, install$6 as TreeChart, TreeSeriesOption, install$7 as TreemapChart, TreemapSeriesOption } from './shared';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { install$
|
|
1
|
+
export { install$54 as AriaComponent, AriaOption as AriaComponentOption, install$37 as AxisPointerComponent, AxisPointerOption as AxisPointerComponentOption, install$38 as BrushComponent, BrushOption as BrushComponentOption, install$33 as CalendarComponent, CalendarOption as CalendarComponentOption, install$48 as DataZoomComponent, DataZoomComponentOption, install$49 as DataZoomInsideComponent, install$50 as DataZoomSliderComponent, install$56 as DatasetComponent, DatasetOption as DatasetComponentOption, install$30 as GeoComponent, GeoOption as GeoComponentOption, install$34 as GraphicComponent, GraphicComponentLooseOption as GraphicComponentOption, install$27 as GridComponent, GridOption as GridComponentOption, install$26 as GridSimpleComponent, install$45 as LegendComponent, LegendComponentOption, install$47 as LegendPlainComponent, install$46 as LegendScrollComponent, install$43 as MarkAreaComponent, MarkAreaOption as MarkAreaComponentOption, install$44 as MarkLabelComponent, MarkLabelOption as MarkLabelComponentOption, install$42 as MarkLineComponent, MarkLineOption as MarkLineComponentOption, install$41 as MarkPointComponent, MarkPointOption as MarkPointComponentOption, install$32 as ParallelComponent, ParallelCoordinateSystemOption as ParallelComponentOption, install$28 as PolarComponent, PolarOption as PolarComponentOption, install$29 as RadarComponent, RadarOption as RadarComponentOption, install$31 as SingleAxisComponent, SingleAxisOption as SingleAxisComponentOption, install$40 as TimelineComponent, TimelineOption as TimelineComponentOption, install$39 as TitleComponent, TitleOption as TitleComponentOption, install$35 as ToolboxComponent, ToolboxComponentOption, install$36 as TooltipComponent, TooltipOption as TooltipComponentOption, install$55 as TransformComponent, install$51 as VisualMapComponent, VisualMapComponentOption, install$52 as VisualMapContinuousComponent, install$53 as VisualMapPiecewiseComponent } from './shared';
|
package/types/dist/echarts.d.ts
CHANGED
|
@@ -10677,6 +10677,7 @@ interface LinesStatesMixin$1 {
|
|
|
10677
10677
|
}
|
|
10678
10678
|
interface LinesStateOption$1<TCbParams = never> {
|
|
10679
10679
|
lineStyle?: LinesLineStyleOption$1<(TCbParams extends never ? never : (params: TCbParams) => ZRColor) | ZRColor>;
|
|
10680
|
+
itemStyle?: ItemStyleOption<TCbParams>;
|
|
10680
10681
|
}
|
|
10681
10682
|
interface LinesDataItemOption$1 extends LinesStateOption$1, StatesOptionMixin<LinesStateOption$1, LinesStatesMixin$1 & {
|
|
10682
10683
|
emphasis?: {
|
|
@@ -10686,19 +10687,16 @@ interface LinesDataItemOption$1 extends LinesStateOption$1, StatesOptionMixin<Li
|
|
|
10686
10687
|
};
|
|
10687
10688
|
}> {
|
|
10688
10689
|
name?: string;
|
|
10689
|
-
|
|
10690
|
-
toName?: string;
|
|
10691
|
-
symbol?: string[] | string;
|
|
10690
|
+
symbol?: string;
|
|
10692
10691
|
symbolSize?: number[] | number;
|
|
10693
10692
|
coords?: LinesCoords$1;
|
|
10694
10693
|
value?: LinesValue$1;
|
|
10695
|
-
effect?: LineDrawModelOption['effect'];
|
|
10696
10694
|
}
|
|
10697
10695
|
interface LinesPlotSeriesOption extends SeriesOption<LinesStateOption$1, LinesStatesMixin$1>, LinesStateOption$1<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesOnPolarOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesOnCalendarOptionMixin, SeriesLargeOptionMixin {
|
|
10698
10696
|
type?: 'linesPlot';
|
|
10699
10697
|
coordinateSystem?: string;
|
|
10700
|
-
|
|
10701
|
-
|
|
10698
|
+
symbol?: string;
|
|
10699
|
+
symbolSize?: number[] | number;
|
|
10702
10700
|
effect?: LineDrawModelOption['effect'];
|
|
10703
10701
|
/**
|
|
10704
10702
|
* If lines are polyline
|
|
@@ -10722,6 +10720,7 @@ interface LinesPlotSeriesOption extends SeriesOption<LinesStateOption$1, LinesSt
|
|
|
10722
10720
|
histogramVisible?: boolean;
|
|
10723
10721
|
barVisible?: boolean;
|
|
10724
10722
|
symbolByStep?: boolean;
|
|
10723
|
+
shadowShape?: boolean;
|
|
10725
10724
|
step?: boolean;
|
|
10726
10725
|
}
|
|
10727
10726
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { install$
|
|
1
|
+
export { install$58 as CanvasRenderer, install$57 as SVGRenderer } from './shared';
|