@visionaris-bruno/vs-echarts 6.1.1 → 6.2.0
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
|
@@ -3,7 +3,7 @@ import { OnChanges, OnDestroy, ElementRef, EventEmitter, SimpleChanges } from '@
|
|
|
3
3
|
import * as echarts from 'echarts';
|
|
4
4
|
import { LineSeriesOption, BarSeriesOption, PieSeriesOption, EChartsOption, SeriesOption } from 'echarts';
|
|
5
5
|
import { CategoryAxisBaseOption, ValueAxisBaseOption } from 'echarts/types/src/coord/axisCommonTypes.js';
|
|
6
|
-
import { TooltipOption
|
|
6
|
+
import { TooltipOption } from 'echarts/types/dist/shared';
|
|
7
7
|
|
|
8
8
|
type ChartKey = keyof Omit<IOptionsOverridesWrapper, "axis" | "tooltip">;
|
|
9
9
|
/** los recibira el director
|
|
@@ -82,6 +82,23 @@ interface IOptionsOverrides {
|
|
|
82
82
|
/** ring options overrides */
|
|
83
83
|
ring: IRingOptionsOverrides;
|
|
84
84
|
}
|
|
85
|
+
type NGXEchartsSelectChangeEventData = {
|
|
86
|
+
type: string;
|
|
87
|
+
fromAction: string;
|
|
88
|
+
fromActionPayload: {
|
|
89
|
+
dataIndexInside: number;
|
|
90
|
+
dataType: unknown;
|
|
91
|
+
isFromClick: boolean;
|
|
92
|
+
seriesIndex: number;
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
isFromClick: boolean;
|
|
96
|
+
selected: {
|
|
97
|
+
dataIndex: number[];
|
|
98
|
+
seriesIndex: number;
|
|
99
|
+
}[];
|
|
100
|
+
escapeConnect: unknown;
|
|
101
|
+
};
|
|
85
102
|
|
|
86
103
|
/**
|
|
87
104
|
* IEChartSeries
|
|
@@ -199,11 +216,14 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
199
216
|
* necesarias para el dibujado de las series del grafico.
|
|
200
217
|
*/
|
|
201
218
|
protected abstract baseSeriesOptions: SeriesOption;
|
|
219
|
+
/** Construye y setea o actualiza las opciones.
|
|
220
|
+
*
|
|
221
|
+
* Utilizar cuando requiera un redibujo completo.
|
|
222
|
+
*
|
|
223
|
+
* Ej: Cambio en la data o estructural.
|
|
224
|
+
*/
|
|
225
|
+
protected abstract updateChartOptions(): void;
|
|
202
226
|
protected chartInstance?: echarts.ECharts;
|
|
203
|
-
protected currentLegendSelected: any;
|
|
204
|
-
/** Estado de selección para filtros cruzados */
|
|
205
|
-
protected selectedCategoryIndex: number | null;
|
|
206
|
-
protected selectedSeriesIndex: number | null;
|
|
207
227
|
/** Opciones de inicializacion de echarts
|
|
208
228
|
*
|
|
209
229
|
* NgxEchartsDirective.initOpts
|
|
@@ -211,38 +231,18 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
211
231
|
initOptions: {
|
|
212
232
|
renderer: string;
|
|
213
233
|
};
|
|
214
|
-
/** Opciones configuradas para ngx-echarts */
|
|
215
|
-
chartOptions: any;
|
|
216
|
-
mergeOptions: ECBasicOption;
|
|
217
234
|
constructor();
|
|
218
235
|
ngOnChanges(changes: SimpleChanges): void;
|
|
219
236
|
ngOnDestroy(): void;
|
|
220
|
-
/**
|
|
221
|
-
*
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
*/
|
|
227
|
-
private setupBaseInteractions;
|
|
228
|
-
onChartClick(event: any): void;
|
|
229
|
-
/**
|
|
230
|
-
* Maneja la lógica de alternancia de selección.
|
|
231
|
-
*/
|
|
232
|
-
protected handleSelection(dataIndex: number, seriesIndex: number): void;
|
|
233
|
-
/**
|
|
234
|
-
* Limpia el estado de selección actual.
|
|
235
|
-
*/
|
|
236
|
-
protected clearSelection(): void;
|
|
237
|
-
dispatchAction(type: string, d: {
|
|
237
|
+
/** setear/actualizar opciones del chart
|
|
238
|
+
*
|
|
239
|
+
* Ver: https://echarts.apache.org/en/api.html#echartsInstance.setOption
|
|
240
|
+
*/
|
|
241
|
+
private setOptions;
|
|
242
|
+
protected dispatchAction(type: string, d: {
|
|
238
243
|
seriesIndex?: number[];
|
|
239
244
|
dataIndex?: number[];
|
|
240
245
|
}): void;
|
|
241
|
-
/**
|
|
242
|
-
* Maneja clics en la leyenda para persistir filtros.
|
|
243
|
-
*/
|
|
244
|
-
onLegendSelectChanged(event: any): void;
|
|
245
|
-
private updateOptions;
|
|
246
246
|
/**
|
|
247
247
|
* Hook de template method invocado por `ngOnChanges`.
|
|
248
248
|
* Las subclases lo sobreescriben para añadir lógica propia
|
|
@@ -250,16 +250,26 @@ declare abstract class BaseEchartsComponent implements OnChanges, OnDestroy {
|
|
|
250
250
|
* el comportamiento base (detectar inputs relevantes y actualizar el chart).
|
|
251
251
|
*/
|
|
252
252
|
protected onInputChanges(changes: SimpleChanges): void;
|
|
253
|
-
protected abstract updateChartOptions(opts?: {
|
|
254
|
-
notMerge?: boolean;
|
|
255
|
-
}): void;
|
|
256
253
|
/**
|
|
257
|
-
* Gatilla actualización
|
|
254
|
+
* Gatilla actualización.
|
|
255
|
+
*
|
|
258
256
|
*/
|
|
259
|
-
protected triggerUpdate(options:
|
|
257
|
+
protected triggerUpdate(options: EChartsOption): void;
|
|
260
258
|
/**
|
|
261
|
-
*
|
|
259
|
+
* Captura la instancia de echarts (usado por ngx-echarts)
|
|
260
|
+
*/
|
|
261
|
+
onChartInit(instance: any): void;
|
|
262
|
+
onChartClick(event: any): void;
|
|
263
|
+
/**
|
|
264
|
+
* Seleccion y des seleccion de item.
|
|
265
|
+
*
|
|
266
|
+
* Para hacer uso de esta funcion las opciones de series
|
|
267
|
+
* del grafico deben tener seteado 'selectMode'.
|
|
262
268
|
*/
|
|
269
|
+
onChartSelectChanged(event: NGXEchartsSelectChangeEventData): void;
|
|
270
|
+
/**
|
|
271
|
+
* Método público para forzar el redimensionado desde el padre
|
|
272
|
+
*/
|
|
263
273
|
resize(): void;
|
|
264
274
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseEchartsComponent, never>;
|
|
265
275
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseEchartsComponent, never, never, { "data": { "alias": "data"; "required": false; }; "optionsOverrides": { "alias": "optionsOverrides"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "colorResolver": { "alias": "colorResolver"; "required": false; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; }; }, { "chartClick": "chartClick"; }, never, never, true, never>;
|
|
@@ -326,17 +336,12 @@ declare class EchartsRingComponent extends BaseEchartsComponent {
|
|
|
326
336
|
onChartClick(event: any): void;
|
|
327
337
|
onChartMouseOver(event: any): void;
|
|
328
338
|
onChartMouseOut(event: any): void;
|
|
329
|
-
|
|
330
|
-
* Captura los cambios en la selección de la leyenda para persistirlos.
|
|
331
|
-
*/
|
|
332
|
-
onLegendSelectChanged(event: any): void;
|
|
339
|
+
onChartSelectChangedParcheado(e: NGXEchartsSelectChangeEventData): void;
|
|
333
340
|
/**
|
|
334
341
|
* Actualiza el texto del Graphic central y persiste la selección en el modelo de opciones.
|
|
335
342
|
*/
|
|
336
343
|
private setGraphicText;
|
|
337
|
-
protected updateChartOptions(
|
|
338
|
-
notMerge?: boolean;
|
|
339
|
-
}): void;
|
|
344
|
+
protected updateChartOptions(): void;
|
|
340
345
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsRingComponent, never>;
|
|
341
346
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsRingComponent, "vs-echarts-ring", never, {}, {}, never, never, true, never>;
|
|
342
347
|
}
|
|
@@ -422,12 +427,6 @@ declare abstract class EchartsBarComponent extends BaseEchartsComponent {
|
|
|
422
427
|
constructor();
|
|
423
428
|
protected make(makeOpts: MakeBarOpts): void;
|
|
424
429
|
protected updateChartOptions(): void;
|
|
425
|
-
onChartInit(instance: any): void;
|
|
426
|
-
protected onInputChanges(changes: SimpleChanges): void;
|
|
427
|
-
private setupAdditionalInteractions;
|
|
428
|
-
private highlightSector;
|
|
429
|
-
private clearHighlight;
|
|
430
|
-
onLegendSelectChanged(event: any): void;
|
|
431
430
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsBarComponent, never>;
|
|
432
431
|
static ɵcmp: i0.ɵɵComponentDeclaration<EchartsBarComponent, "vs-echarts-bar", never, {}, {}, never, never, true, never>;
|
|
433
432
|
}
|
|
@@ -482,7 +481,6 @@ declare abstract class EchartsLineComponent extends BaseEchartsComponent {
|
|
|
482
481
|
*/
|
|
483
482
|
protected abstract variantBaseProduct: VSEChartProduct;
|
|
484
483
|
constructor();
|
|
485
|
-
protected onInputChanges(changes: SimpleChanges): void;
|
|
486
484
|
protected make(makeOpts: MakeLineOpts): void;
|
|
487
485
|
protected updateChartOptions(): void;
|
|
488
486
|
static ɵfac: i0.ɵɵFactoryDeclaration<EchartsLineComponent, never>;
|
|
@@ -508,4 +506,4 @@ declare class EChartsAreaStackComponent extends EchartsLineComponent {
|
|
|
508
506
|
}
|
|
509
507
|
|
|
510
508
|
export { BaseEchartsComponent, EChartsAreaComponent, EChartsAreaStackComponent, EChartsBarStackedComponent, EChartsBarStackedRadialComponent, EChartsHBarComponent, EChartsHBarStackedComponent, EchartsBarComponent, EchartsLineComponent, EchartsRingComponent, defaultOptionsOverrides, initializeEcharts, provideVSEcharts };
|
|
511
|
-
export type { ChartColorResolver, ChartOrientation, EChartClickType, EChartValueFormatter, IAreaOptionsOverrides, IAreaStackOptionsOverrides, IAxisOptionsOverrides, IBarOptionsOverrides, IBarStackedOptionsOverrides, IBarStackedRadialOptionsOverrides, IEChartBuilder, IEChartData, IEChartSeries, IHBarOptionsOverrides, IHBarStackedOptionsOverrides, ILineOptionsOverrides, IOptionsOverrides, IOptionsOverridesWrapper, IRingOptionsOverrides, ITooltipOptionsOverrides, VSEChartProduct };
|
|
509
|
+
export type { ChartColorResolver, ChartOrientation, EChartClickType, EChartValueFormatter, IAreaOptionsOverrides, IAreaStackOptionsOverrides, IAxisOptionsOverrides, IBarOptionsOverrides, IBarStackedOptionsOverrides, IBarStackedRadialOptionsOverrides, IEChartBuilder, IEChartData, IEChartSeries, IHBarOptionsOverrides, IHBarStackedOptionsOverrides, ILineOptionsOverrides, IOptionsOverrides, IOptionsOverridesWrapper, IRingOptionsOverrides, ITooltipOptionsOverrides, NGXEchartsSelectChangeEventData, VSEChartProduct };
|