@visionaris-bruno/vs-echarts 9.0.3 → 9.0.4
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
|
@@ -6,14 +6,14 @@ import { CategoryAxisBaseOption, ValueAxisBaseOption } from 'echarts/types/src/c
|
|
|
6
6
|
import { TooltipOption } from 'echarts/types/dist/shared';
|
|
7
7
|
import * as _visionaris_bruno_vs_echarts from '@visionaris-bruno/vs-echarts';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
type ChartKey = keyof Omit<IOptionsOverridesWrapper, "axis" | "tooltip">;
|
|
10
|
+
type ISeriesLayoutOpts = {
|
|
10
11
|
coordinateSystem?: 'cartesian2d' | 'polar';
|
|
11
12
|
axisTypes?: {
|
|
12
13
|
x: 'category' | 'value';
|
|
13
14
|
y: 'category' | 'value';
|
|
14
15
|
};
|
|
15
|
-
}
|
|
16
|
-
type ChartKey = keyof Omit<IOptionsOverridesWrapper, "axis" | "tooltip">;
|
|
16
|
+
};
|
|
17
17
|
/** los recibira el director
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
@@ -21,12 +21,12 @@ type VSEChartProduct = {
|
|
|
21
21
|
chartKey: ChartKey;
|
|
22
22
|
baseOptions: EChartsOption;
|
|
23
23
|
};
|
|
24
|
-
interface IEChartBuilder<SeriesType = SeriesOption,
|
|
24
|
+
interface IEChartBuilder<SeriesType = SeriesOption, SeriesConfigOptions = any, DatasetConfigOptions = any> {
|
|
25
25
|
/** producto base */
|
|
26
26
|
baseProduct: VSEChartProduct;
|
|
27
27
|
reset(): void;
|
|
28
28
|
addDataset(data: IEChartData, opts?: DatasetConfigOptions): void;
|
|
29
|
-
addSeries(data: IEChartData, overrides: SeriesType, opts?:
|
|
29
|
+
addSeries(data: IEChartData, overrides: SeriesType, opts?: SeriesConfigOptions): void;
|
|
30
30
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
31
31
|
addPolar(): void;
|
|
32
32
|
addXAxis(data: IEChartData, overrides: IOptionsOverrides["axis"], type?: 'category' | 'value'): void;
|
|
@@ -37,9 +37,9 @@ interface IEChartBuilder<SeriesType = SeriesOption, OptsType = any, DatasetConfi
|
|
|
37
37
|
addCommons(): void;
|
|
38
38
|
addGraphic(): void;
|
|
39
39
|
addDataZoom(): void;
|
|
40
|
-
setValueFormatter(formatter:
|
|
41
|
-
setPalette(palette: string[]
|
|
42
|
-
setColorResolver(resolver: ChartColorResolver
|
|
40
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
41
|
+
setPalette(palette: string[]): void;
|
|
42
|
+
setColorResolver(resolver: ChartColorResolver): void;
|
|
43
43
|
getResult(): EChartsOption;
|
|
44
44
|
}
|
|
45
45
|
type EChartClickType = 'cross-filter';
|
|
@@ -169,11 +169,11 @@ interface IEChartData {
|
|
|
169
169
|
source: IEChartDataNode[];
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
|
-
*
|
|
172
|
+
* ChartValueFormatter
|
|
173
173
|
*
|
|
174
174
|
* Callback para formatear los valores numéricos de las celdas/series.
|
|
175
175
|
*/
|
|
176
|
-
type
|
|
176
|
+
type ChartValueFormatter = (value: number, key: string) => string;
|
|
177
177
|
/**
|
|
178
178
|
* ChartColorResolver
|
|
179
179
|
*
|
|
@@ -212,7 +212,7 @@ declare class VSEchartsConfigService {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
type MakeOpts = {
|
|
215
|
-
valueFormatter?:
|
|
215
|
+
valueFormatter?: ChartValueFormatter;
|
|
216
216
|
palette?: string[];
|
|
217
217
|
colorResolver?: ChartColorResolver;
|
|
218
218
|
axisTypes?: {
|
|
@@ -229,7 +229,7 @@ type MakeBoxplotOpts = MakeOpts & {};
|
|
|
229
229
|
*/
|
|
230
230
|
declare class VSECDirector {
|
|
231
231
|
private builder;
|
|
232
|
-
constructor(builder: IEChartBuilder
|
|
232
|
+
constructor(builder: IEChartBuilder);
|
|
233
233
|
makeBar(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeBarOpts): void;
|
|
234
234
|
makeBarRadial(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeBarOpts): void;
|
|
235
235
|
makeLine(data: IEChartData, overrides: IOptionsOverridesWrapper, opts?: MakeLineOpts): void;
|
|
@@ -248,11 +248,11 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
248
248
|
data: IEChartData;
|
|
249
249
|
optionsOverrides: IOptionsOverridesWrapper;
|
|
250
250
|
/** Paleta de colores básica */
|
|
251
|
-
palette
|
|
251
|
+
palette: string[];
|
|
252
252
|
/** Resolver de colores dinámico (Callback) */
|
|
253
253
|
colorResolver?: ChartColorResolver;
|
|
254
254
|
/** Formateador de valores para etiquetas y tooltips */
|
|
255
|
-
valueFormatter
|
|
255
|
+
valueFormatter: ChartValueFormatter;
|
|
256
256
|
chartClick: EventEmitter<{
|
|
257
257
|
type: EChartClickType;
|
|
258
258
|
data: any;
|
|
@@ -348,7 +348,7 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
348
348
|
*/
|
|
349
349
|
declare class RingBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
350
350
|
baseProduct: VSEChartProduct;
|
|
351
|
-
protected valueFormatter:
|
|
351
|
+
protected valueFormatter: ChartValueFormatter;
|
|
352
352
|
protected palette: string[];
|
|
353
353
|
protected colorResolver?: ChartColorResolver;
|
|
354
354
|
protected result: EChartsOption;
|
|
@@ -366,9 +366,9 @@ declare class RingBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
|
366
366
|
addAngleAxis(data: IEChartData, overrides: IOptionsOverrides["axis"]): void;
|
|
367
367
|
addDataZoom(): void;
|
|
368
368
|
addDataset(data: IEChartData, opts?: any): void;
|
|
369
|
-
setValueFormatter(formatter:
|
|
370
|
-
setPalette(palette: string[]
|
|
371
|
-
setColorResolver(resolver: ChartColorResolver
|
|
369
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
370
|
+
setPalette(palette: string[]): void;
|
|
371
|
+
setColorResolver(resolver: ChartColorResolver): void;
|
|
372
372
|
getResult(): EChartsOption;
|
|
373
373
|
private formatCellValue;
|
|
374
374
|
}
|
|
@@ -414,7 +414,7 @@ declare class EchartsRingComponent extends BaseEchartsComponent {
|
|
|
414
414
|
*/
|
|
415
415
|
declare class PieBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
416
416
|
baseProduct: VSEChartProduct;
|
|
417
|
-
protected valueFormatter:
|
|
417
|
+
protected valueFormatter: ChartValueFormatter;
|
|
418
418
|
protected palette: string[];
|
|
419
419
|
protected colorResolver?: ChartColorResolver;
|
|
420
420
|
protected result: EChartsOption;
|
|
@@ -432,9 +432,9 @@ declare class PieBuilder implements IEChartBuilder<PieSeriesOption> {
|
|
|
432
432
|
addGraphic(): void;
|
|
433
433
|
addDataZoom(): void;
|
|
434
434
|
addDataset(data: IEChartData, opts?: any): void;
|
|
435
|
-
setValueFormatter(formatter:
|
|
436
|
-
setPalette(palette: string[]
|
|
437
|
-
setColorResolver(resolver: ChartColorResolver
|
|
435
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
436
|
+
setPalette(palette: string[]): void;
|
|
437
|
+
setColorResolver(resolver: ChartColorResolver): void;
|
|
438
438
|
getResult(): EChartsOption;
|
|
439
439
|
private formatCellValue;
|
|
440
440
|
}
|
|
@@ -464,7 +464,7 @@ declare class EchartsPieComponent extends BaseEchartsComponent {
|
|
|
464
464
|
*/
|
|
465
465
|
declare class FunnelBuilder implements IEChartBuilder<FunnelSeriesOption> {
|
|
466
466
|
baseProduct: VSEChartProduct;
|
|
467
|
-
protected valueFormatter:
|
|
467
|
+
protected valueFormatter: ChartValueFormatter;
|
|
468
468
|
protected palette: string[];
|
|
469
469
|
protected colorResolver?: ChartColorResolver;
|
|
470
470
|
protected result: EChartsOption;
|
|
@@ -482,7 +482,7 @@ declare class FunnelBuilder implements IEChartBuilder<FunnelSeriesOption> {
|
|
|
482
482
|
addGraphic(): void;
|
|
483
483
|
addDataZoom(): void;
|
|
484
484
|
addDataset(data: IEChartData, opts?: any): void;
|
|
485
|
-
setValueFormatter(formatter:
|
|
485
|
+
setValueFormatter(formatter: ChartValueFormatter | undefined): void;
|
|
486
486
|
setPalette(palette: string[] | undefined): void;
|
|
487
487
|
setColorResolver(resolver: ChartColorResolver | undefined): void;
|
|
488
488
|
getResult(): EChartsOption;
|
|
@@ -505,6 +505,7 @@ declare class EchartsFunnelComponent extends BaseEchartsComponent {
|
|
|
505
505
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsFunnelComponent, "vs-echarts-funnel", never, {}, {}, never, never, true, never>;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
type EChartBuilderSeriesConfigOpts = ISeriesLayoutOpts & {};
|
|
508
509
|
/**
|
|
509
510
|
* Builder principal.
|
|
510
511
|
*
|
|
@@ -512,9 +513,9 @@ declare class EchartsFunnelComponent extends BaseEchartsComponent {
|
|
|
512
513
|
*
|
|
513
514
|
* Puede verse utilizado en graficos como Lineas y Bars. Siempre que se pueda priorizar utilizar este.
|
|
514
515
|
*/
|
|
515
|
-
declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOption & LineSeriesOption & ScatterSeriesOption,
|
|
516
|
+
declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOption & LineSeriesOption & ScatterSeriesOption, EChartBuilderSeriesConfigOpts> {
|
|
516
517
|
baseProduct: VSEChartProduct;
|
|
517
|
-
protected valueFormatter:
|
|
518
|
+
protected valueFormatter: ChartValueFormatter;
|
|
518
519
|
protected palette: string[];
|
|
519
520
|
protected colorResolver?: ChartColorResolver;
|
|
520
521
|
protected result: EChartsOption;
|
|
@@ -527,7 +528,7 @@ declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOp
|
|
|
527
528
|
* @param overrides
|
|
528
529
|
* @returns
|
|
529
530
|
*/
|
|
530
|
-
addSeries(data: IEChartData, overrides:
|
|
531
|
+
addSeries(data: IEChartData, overrides: BarSeriesOption & LineSeriesOption & ScatterSeriesOption, opts?: ISeriesLayoutOpts): void;
|
|
531
532
|
/**
|
|
532
533
|
* TODO: Mejorar funcion, no me convence como se implemento el tooltip formatter.
|
|
533
534
|
* @param data
|
|
@@ -541,7 +542,7 @@ declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOp
|
|
|
541
542
|
addAngleAxis(data: IEChartData, overrides: IOptionsOverrides["axis"]): void;
|
|
542
543
|
addLegend(): void;
|
|
543
544
|
addGraphic(): void;
|
|
544
|
-
addDataset(data: IEChartData
|
|
545
|
+
addDataset(data: IEChartData): void;
|
|
545
546
|
addDataZoom(): void;
|
|
546
547
|
getResult(): EChartsOption;
|
|
547
548
|
/**
|
|
@@ -551,7 +552,7 @@ declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOp
|
|
|
551
552
|
/**
|
|
552
553
|
* Permite inyectar un formateador de valores externo.
|
|
553
554
|
*/
|
|
554
|
-
setValueFormatter(formatter:
|
|
555
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
555
556
|
/**
|
|
556
557
|
* Permite inyectar una paleta de colores básica.
|
|
557
558
|
*/
|
|
@@ -560,8 +561,8 @@ declare class EChartBuilder implements IEChartBuilder<SeriesOption & BarSeriesOp
|
|
|
560
561
|
* Permite inyectar un resolver de colores dinámico.
|
|
561
562
|
*/
|
|
562
563
|
setColorResolver(resolver: ChartColorResolver): void;
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
private getCategoryAxisOptions;
|
|
565
|
+
private getValueAxisOptions;
|
|
565
566
|
}
|
|
566
567
|
|
|
567
568
|
declare abstract class EchartsBarComponent extends BaseEchartsComponent {
|
|
@@ -677,7 +678,7 @@ declare abstract class EchartsScatterComponent extends BaseEchartsComponent {
|
|
|
677
678
|
|
|
678
679
|
declare class SunburstBuilder implements IEChartBuilder<SunburstSeriesOption> {
|
|
679
680
|
baseProduct: VSEChartProduct;
|
|
680
|
-
protected valueFormatter:
|
|
681
|
+
protected valueFormatter: ChartValueFormatter;
|
|
681
682
|
protected palette: string[];
|
|
682
683
|
protected colorResolver?: ChartColorResolver;
|
|
683
684
|
protected result: EChartsOption;
|
|
@@ -686,7 +687,6 @@ declare class SunburstBuilder implements IEChartBuilder<SunburstSeriesOption> {
|
|
|
686
687
|
addSeries(data: IEChartData, overrides: SunburstSeriesOption): void;
|
|
687
688
|
addTooltip(data: IEChartData, overrides: ITooltipOptionsOverrides): void;
|
|
688
689
|
addCommons(): void;
|
|
689
|
-
addGraphic(): void;
|
|
690
690
|
getResult(): EChartsOption;
|
|
691
691
|
addPolar(): void;
|
|
692
692
|
addXAxis(data: IEChartData, overrides: IOptionsOverrides["axis"], type: "category" | "value"): void;
|
|
@@ -696,10 +696,11 @@ declare class SunburstBuilder implements IEChartBuilder<SunburstSeriesOption> {
|
|
|
696
696
|
addLegend(): void;
|
|
697
697
|
addDataZoom(): void;
|
|
698
698
|
addDataset(data: IEChartData, opts?: any): void;
|
|
699
|
+
addGraphic(): void;
|
|
699
700
|
/**
|
|
700
701
|
* Permite inyectar un formateador de valores externo.
|
|
701
702
|
*/
|
|
702
|
-
setValueFormatter(formatter:
|
|
703
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
703
704
|
/**
|
|
704
705
|
* Permite inyectar una paleta de colores básica.
|
|
705
706
|
*/
|
|
@@ -727,7 +728,7 @@ declare class EChartsSunburstComponent extends BaseEchartsComponent {
|
|
|
727
728
|
*/
|
|
728
729
|
declare class SankeyBuilder implements IEChartBuilder<SankeySeriesOption> {
|
|
729
730
|
baseProduct: VSEChartProduct;
|
|
730
|
-
protected valueFormatter:
|
|
731
|
+
protected valueFormatter: ChartValueFormatter;
|
|
731
732
|
protected palette: string[];
|
|
732
733
|
protected colorResolver?: ChartColorResolver;
|
|
733
734
|
protected result: EChartsOption;
|
|
@@ -746,9 +747,9 @@ declare class SankeyBuilder implements IEChartBuilder<SankeySeriesOption> {
|
|
|
746
747
|
addCommons(): void;
|
|
747
748
|
addGraphic(): void;
|
|
748
749
|
getResult(): EChartsOption;
|
|
749
|
-
setValueFormatter(formatter:
|
|
750
|
-
setPalette(palette: string[]
|
|
751
|
-
setColorResolver(resolver: ChartColorResolver
|
|
750
|
+
setValueFormatter(formatter: ChartValueFormatter): void;
|
|
751
|
+
setPalette(palette: string[]): void;
|
|
752
|
+
setColorResolver(resolver: ChartColorResolver): void;
|
|
752
753
|
}
|
|
753
754
|
|
|
754
755
|
declare class EchartsSankeyComponent extends BaseEchartsComponent {
|
|
@@ -772,4 +773,4 @@ declare class EChartsHBoxplotComponent extends BaseEchartsComponent {
|
|
|
772
773
|
}
|
|
773
774
|
|
|
774
775
|
export { BaseEchartsComponent, EChartsAreaComponent, EChartsAreaStackComponent, EChartsBarStackedComponent, EChartsBarStackedRadialComponent, EChartsHBarComponent, EChartsHBarStackedComponent, EChartsHBoxplotComponent, EChartsSunburstComponent, EchartsBarComponent, EchartsFunnelComponent, EchartsLineComponent, EchartsPieComponent, EchartsRingComponent, EchartsSankeyComponent, EchartsScatterComponent, VSEchartsConfigService, defaultOptionsOverrides, provideVSEcharts };
|
|
775
|
-
export type { ChartColorResolver, ChartOrientation,
|
|
776
|
+
export type { ChartColorResolver, ChartOrientation, ChartValueFormatter, EChartClickType, IAreaOptionsOverrides, IAreaStackOptionsOverrides, IAxisOptionsOverrides, IBarOptionsOverrides, IBarStackedOptionsOverrides, IBarStackedRadialOptionsOverrides, IBoxplotOptionsOverrides, IEChartBuilder, IEChartData, IEChartDataNode, IEChartDimension, IFunnelOptionsOverrides, IHBarOptionsOverrides, IHBarStackedOptionsOverrides, IHBoxplotOptionsOverrides, ILineOptionsOverrides, IOptionsOverrides, IOptionsOverridesWrapper, IPieOptionsOverrides, IRingOptionsOverrides, ISankeyOptionsOverrides, IScatterOptionsOverrides, ISeriesLayoutOpts, ISunburstOptionsOverrides, ITooltipOptionsOverrides, NGXEchartsSelectChangeEventData, VSEChartProduct, VSEchartsConfig, VSEchartsLocale };
|