@visionaris-bruno/vs-echarts 7.1.0 → 7.1.3
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/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ interface IEChartBuilder<SeriesType = SeriesOption> {
|
|
|
22
22
|
* @param data
|
|
23
23
|
* @param overrides
|
|
24
24
|
*/
|
|
25
|
-
addSeries(data: IEChartData, overrides:
|
|
25
|
+
addSeries(data: IEChartData, overrides: SeriesType): void;
|
|
26
26
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
27
27
|
addPolar(): void;
|
|
28
28
|
addXAxis(data: {
|
|
@@ -39,6 +39,7 @@ interface IEChartBuilder<SeriesType = SeriesOption> {
|
|
|
39
39
|
setValueFormatter(formatter: EChartValueFormatter | undefined): void;
|
|
40
40
|
setPalette(palette: string[] | undefined): void;
|
|
41
41
|
setColorResolver(resolver: ChartColorResolver | undefined): void;
|
|
42
|
+
getResult(): EChartsOption;
|
|
42
43
|
}
|
|
43
44
|
type EChartClickType = 'cross-filter';
|
|
44
45
|
interface IAreaOptionsOverrides extends ILineOptionsOverrides {
|
|
@@ -207,7 +208,7 @@ type MakeScatterOpts = MakeOpts;
|
|
|
207
208
|
*/
|
|
208
209
|
declare class VSECDirector {
|
|
209
210
|
private builder;
|
|
210
|
-
constructor(builder: IEChartBuilder);
|
|
211
|
+
constructor(builder: IEChartBuilder<any>);
|
|
211
212
|
makeBar(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeBarOpts): void;
|
|
212
213
|
makeBarRadial(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeBarOpts): void;
|
|
213
214
|
makeLine(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeLineOpts): void;
|
|
@@ -240,7 +241,7 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
240
241
|
* producto base/inicial para el builder.
|
|
241
242
|
*/
|
|
242
243
|
protected abstract baseProduct: VSEChartProduct;
|
|
243
|
-
protected abstract builder: IEChartBuilder
|
|
244
|
+
protected abstract builder: IEChartBuilder<any>;
|
|
244
245
|
/**
|
|
245
246
|
* director de construcción.
|
|
246
247
|
*
|
|
@@ -250,19 +251,12 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
250
251
|
* Ver: https://refactoring.guru/es/design-patterns/builder
|
|
251
252
|
*/
|
|
252
253
|
protected abstract director: VSECDirector;
|
|
253
|
-
protected abstract make(
|
|
254
|
+
protected abstract make(): void;
|
|
254
255
|
/**
|
|
255
256
|
* Opciones de series escenciales, inmutables y estaticas minimas
|
|
256
257
|
* necesarias para el dibujado de las series del grafico.
|
|
257
258
|
*/
|
|
258
259
|
protected abstract baseSeriesOptions: SeriesOption;
|
|
259
|
-
/** Construye y setea o actualiza las opciones.
|
|
260
|
-
*
|
|
261
|
-
* Utilizar cuando requiera un redibujo completo.
|
|
262
|
-
*
|
|
263
|
-
* Ej: Cambio en la data o estructural.
|
|
264
|
-
*/
|
|
265
|
-
protected abstract updateChartOptions(): void;
|
|
266
260
|
protected chartInstance?: echarts.ECharts;
|
|
267
261
|
/** Opciones de inicializacion de echarts
|
|
268
262
|
*
|
|
@@ -290,6 +284,7 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
290
284
|
* el comportamiento base (detectar inputs relevantes y actualizar el chart).
|
|
291
285
|
*/
|
|
292
286
|
protected onInputChanges(changes: SimpleChanges): void;
|
|
287
|
+
private prepareOptions;
|
|
293
288
|
/**
|
|
294
289
|
* Gatilla actualización.
|
|
295
290
|
*
|
|
@@ -326,7 +321,7 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
326
321
|
* Builder concreto para el grafico de Ring.
|
|
327
322
|
*
|
|
328
323
|
*/
|
|
329
|
-
declare class RingBuilder implements IEChartBuilder {
|
|
324
|
+
declare class RingBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
330
325
|
baseProduct: VSEChartProduct;
|
|
331
326
|
protected valueFormatter: EChartValueFormatter;
|
|
332
327
|
protected palette: string[];
|
|
@@ -335,7 +330,7 @@ declare class RingBuilder implements IEChartBuilder {
|
|
|
335
330
|
constructor(baseProduct: VSEChartProduct);
|
|
336
331
|
reset(): void;
|
|
337
332
|
addCommons(): void;
|
|
338
|
-
addSeries(data: IEChartData, overrides:
|
|
333
|
+
addSeries(data: IEChartData, overrides: PieSeriesOption): void;
|
|
339
334
|
addGraphic(): void;
|
|
340
335
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
341
336
|
addLegend(): void;
|
|
@@ -371,7 +366,7 @@ declare class EchartsRingComponent extends BaseEchartsComponent {
|
|
|
371
366
|
private selectedPercent;
|
|
372
367
|
private currentGraphicText;
|
|
373
368
|
constructor();
|
|
374
|
-
protected make(
|
|
369
|
+
protected make(): void;
|
|
375
370
|
protected onInputChanges(changes: SimpleChanges): void;
|
|
376
371
|
/**
|
|
377
372
|
* Maneja clics en los sectores del ring.
|
|
@@ -384,7 +379,6 @@ declare class EchartsRingComponent extends BaseEchartsComponent {
|
|
|
384
379
|
* Actualiza el texto del Graphic central y persiste la selección en el modelo de opciones.
|
|
385
380
|
*/
|
|
386
381
|
private setGraphicText;
|
|
387
|
-
protected updateChartOptions(): void;
|
|
388
382
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsRingComponent, never>;
|
|
389
383
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsRingComponent, "vs-echarts-ring", never, {}, {}, never, never, true, never>;
|
|
390
384
|
}
|
|
@@ -395,7 +389,7 @@ declare class EchartsRingComponent extends BaseEchartsComponent {
|
|
|
395
389
|
* Builder concreto para el gráfico de Pie (torta concéntrica).
|
|
396
390
|
*
|
|
397
391
|
*/
|
|
398
|
-
declare class PieBuilder implements IEChartBuilder {
|
|
392
|
+
declare class PieBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
399
393
|
baseProduct: VSEChartProduct;
|
|
400
394
|
protected valueFormatter: EChartValueFormatter;
|
|
401
395
|
protected palette: string[];
|
|
@@ -404,7 +398,7 @@ declare class PieBuilder implements IEChartBuilder {
|
|
|
404
398
|
constructor(baseProduct: VSEChartProduct);
|
|
405
399
|
reset(): void;
|
|
406
400
|
addCommons(): void;
|
|
407
|
-
addSeries(data: IEChartData, overrides:
|
|
401
|
+
addSeries(data: IEChartData, overrides: PieSeriesOption): void;
|
|
408
402
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
409
403
|
addLegend(): void;
|
|
410
404
|
addPolar(): void;
|
|
@@ -437,8 +431,7 @@ declare class EchartsPieComponent extends BaseEchartsComponent {
|
|
|
437
431
|
protected builder: PieBuilder;
|
|
438
432
|
protected director: VSECDirector;
|
|
439
433
|
constructor();
|
|
440
|
-
protected make(
|
|
441
|
-
protected updateChartOptions(): void;
|
|
434
|
+
protected make(): void;
|
|
442
435
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsPieComponent, never>;
|
|
443
436
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsPieComponent, "vs-echarts-pie", never, {}, {}, never, never, true, never>;
|
|
444
437
|
}
|
|
@@ -448,7 +441,7 @@ declare class EchartsPieComponent extends BaseEchartsComponent {
|
|
|
448
441
|
*
|
|
449
442
|
* Concrete builder for Funnel charts.
|
|
450
443
|
*/
|
|
451
|
-
declare class FunnelBuilder implements IEChartBuilder {
|
|
444
|
+
declare class FunnelBuilder implements IEChartBuilder<FunnelSeriesOption> {
|
|
452
445
|
baseProduct: VSEChartProduct;
|
|
453
446
|
protected valueFormatter: EChartValueFormatter;
|
|
454
447
|
protected palette: string[];
|
|
@@ -457,7 +450,7 @@ declare class FunnelBuilder implements IEChartBuilder {
|
|
|
457
450
|
constructor(baseProduct: VSEChartProduct);
|
|
458
451
|
reset(): void;
|
|
459
452
|
addCommons(): void;
|
|
460
|
-
addSeries(data: IEChartData, overrides:
|
|
453
|
+
addSeries(data: IEChartData, overrides: FunnelSeriesOption): void;
|
|
461
454
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
462
455
|
addLegend(): void;
|
|
463
456
|
addPolar(): void;
|
|
@@ -488,8 +481,7 @@ declare class EchartsFunnelComponent extends BaseEchartsComponent {
|
|
|
488
481
|
protected builder: FunnelBuilder;
|
|
489
482
|
protected director: VSECDirector;
|
|
490
483
|
constructor();
|
|
491
|
-
protected make(
|
|
492
|
-
protected updateChartOptions(): void;
|
|
484
|
+
protected make(): void;
|
|
493
485
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsFunnelComponent, never>;
|
|
494
486
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsFunnelComponent, "vs-echarts-funnel", never, {}, {}, never, never, true, never>;
|
|
495
487
|
}
|
|
@@ -501,7 +493,7 @@ declare class EchartsFunnelComponent extends BaseEchartsComponent {
|
|
|
501
493
|
*
|
|
502
494
|
* Puede verse utilizado en graficos como Lineas y Bars. Siempre que se pueda priorizar utilizar este.
|
|
503
495
|
*/
|
|
504
|
-
declare class EChartBuilder implements IEChartBuilder {
|
|
496
|
+
declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOption & LineSeriesOption & ScatterSeriesOption> {
|
|
505
497
|
baseProduct: VSEChartProduct;
|
|
506
498
|
protected valueFormatter: EChartValueFormatter;
|
|
507
499
|
protected palette: string[];
|
|
@@ -573,8 +565,7 @@ declare abstract class EchartsBarComponent extends BaseEchartsComponent {
|
|
|
573
565
|
protected builder: EChartBuilder;
|
|
574
566
|
protected director: VSECDirector;
|
|
575
567
|
constructor();
|
|
576
|
-
protected make(
|
|
577
|
-
protected updateChartOptions(): void;
|
|
568
|
+
protected make(): void;
|
|
578
569
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsBarComponent, never>;
|
|
579
570
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsBarComponent, "vs-echarts-bar", never, {}, {}, never, never, true, never>;
|
|
580
571
|
}
|
|
@@ -584,7 +575,7 @@ declare class EChartsHBarComponent extends EchartsBarComponent {
|
|
|
584
575
|
protected variantBaseProduct: VSEChartProduct;
|
|
585
576
|
protected builder: EChartBuilder;
|
|
586
577
|
protected director: VSECDirector;
|
|
587
|
-
protected make(
|
|
578
|
+
protected make(): void;
|
|
588
579
|
static ɵfac: i0.ɵɵFactoryDeclaration<EChartsHBarComponent, never>;
|
|
589
580
|
static ɵcmp: i0.ɵɵComponentDeclaration<EChartsHBarComponent, "vs-echarts-bar", never, {}, {}, never, never, true, never>;
|
|
590
581
|
}
|
|
@@ -603,7 +594,7 @@ declare class EChartsHBarStackedComponent extends EchartsBarComponent {
|
|
|
603
594
|
protected variantBaseProduct: VSEChartProduct;
|
|
604
595
|
protected builder: EChartBuilder;
|
|
605
596
|
protected director: VSECDirector;
|
|
606
|
-
protected make(
|
|
597
|
+
protected make(): void;
|
|
607
598
|
static ɵfac: i0.ɵɵFactoryDeclaration<EChartsHBarStackedComponent, never>;
|
|
608
599
|
static ɵcmp: i0.ɵɵComponentDeclaration<EChartsHBarStackedComponent, "vs-echarts-bar", never, {}, {}, never, never, true, never>;
|
|
609
600
|
}
|
|
@@ -613,7 +604,7 @@ declare class EChartsBarStackedRadialComponent extends EchartsBarComponent {
|
|
|
613
604
|
protected variantBaseProduct: VSEChartProduct;
|
|
614
605
|
protected builder: EChartBuilder;
|
|
615
606
|
protected director: VSECDirector;
|
|
616
|
-
protected make(
|
|
607
|
+
protected make(): void;
|
|
617
608
|
static ɵfac: i0.ɵɵFactoryDeclaration<EChartsBarStackedRadialComponent, never>;
|
|
618
609
|
static ɵcmp: i0.ɵɵComponentDeclaration<EChartsBarStackedRadialComponent, "vs-echarts-bar", never, {}, {}, never, never, true, never>;
|
|
619
610
|
}
|
|
@@ -629,8 +620,7 @@ declare abstract class EchartsLineComponent extends BaseEchartsComponent {
|
|
|
629
620
|
*/
|
|
630
621
|
protected abstract variantBaseProduct: VSEChartProduct;
|
|
631
622
|
constructor();
|
|
632
|
-
protected make(
|
|
633
|
-
protected updateChartOptions(): void;
|
|
623
|
+
protected make(): void;
|
|
634
624
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsLineComponent, never>;
|
|
635
625
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsLineComponent, "vs-echarts-line", never, {}, {}, never, never, true, never>;
|
|
636
626
|
}
|
|
@@ -667,8 +657,7 @@ declare abstract class EchartsScatterComponent extends BaseEchartsComponent {
|
|
|
667
657
|
protected builder: EChartBuilder;
|
|
668
658
|
protected director: VSECDirector;
|
|
669
659
|
constructor();
|
|
670
|
-
protected make(
|
|
671
|
-
protected updateChartOptions(): void;
|
|
660
|
+
protected make(): void;
|
|
672
661
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsScatterComponent, never>;
|
|
673
662
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsScatterComponent, "vs-echarts-scatter", never, {}, {}, never, never, true, never>;
|
|
674
663
|
}
|
|
@@ -716,7 +705,6 @@ declare class EChartsSunburstComponent extends BaseEchartsComponent {
|
|
|
716
705
|
protected builder: SunburstBuilder;
|
|
717
706
|
protected director: VSECDirector;
|
|
718
707
|
protected make(): void;
|
|
719
|
-
protected updateChartOptions(): void;
|
|
720
708
|
static ɵfac: i0.ɵɵFactoryDeclaration<EChartsSunburstComponent, never>;
|
|
721
709
|
static ɵcmp: i0.ɵɵComponentDeclaration<EChartsSunburstComponent, "vs-echarts-sunburst", never, {}, {}, never, never, true, never>;
|
|
722
710
|
}
|