@visionaris-bruno/vs-echarts 6.1.2 → 6.3.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.
@@ -1,6 +1,6 @@
1
1
  import { provideEchartsCore, NgxEchartsDirective } from 'ngx-echarts';
2
2
  import * as echarts from 'echarts/core';
3
- import { BarChart, PieChart, LineChart } from 'echarts/charts';
3
+ import { BarChart, PieChart, LineChart, ScatterChart } from 'echarts/charts';
4
4
  import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, GraphicComponent, ToolboxComponent, PolarComponent } from 'echarts/components';
5
5
  import { CanvasRenderer, SVGRenderer } from 'echarts/renderers';
6
6
  import * as i0 from '@angular/core';
@@ -19,6 +19,8 @@ const EChartsTokens = {
19
19
  fontSize: 11,
20
20
  axisColor: '#666',
21
21
  lineColor: '#ddd',
22
+ sBorderColor: '#a0a0a0ff',
23
+ sShadowColor: '#2e2e2e80',
22
24
  primaryColor: '#08B1D5',
23
25
  tooltipBg: 'rgba(255, 255, 255, 0.95)',
24
26
  defaultPalette: ['#08B1D5', '#2C3E50', '#F39C12', '#E74C3C', '#27AE60', '#8E44AD', '#3498DB', '#16A085', '#D35400', '#2980B9']
@@ -42,6 +44,7 @@ function initializeEcharts() {
42
44
  BarChart,
43
45
  PieChart,
44
46
  LineChart,
47
+ ScatterChart,
45
48
  TitleComponent,
46
49
  TooltipComponent,
47
50
  GridComponent,
@@ -124,6 +127,9 @@ function defaultOptionsOverrides() {
124
127
  },
125
128
  ring: {
126
129
  series: {}
130
+ },
131
+ scatter: {
132
+ series: {}
127
133
  }
128
134
  };
129
135
  }
@@ -152,10 +158,6 @@ class BaseEchartsComponent {
152
158
  updateSubject = new ReplaySubject(1);
153
159
  updateSubscription;
154
160
  chartInstance;
155
- currentLegendSelected = null;
156
- /** Estado de selección para filtros cruzados */
157
- selectedCategoryIndex = null;
158
- selectedSeriesIndex = null;
159
161
  /** Opciones de inicializacion de echarts
160
162
  *
161
163
  * NgxEchartsDirective.initOpts
@@ -163,14 +165,12 @@ class BaseEchartsComponent {
163
165
  initOptions = {
164
166
  renderer: 'svg', // svg se visualiza mejor en el reescalado de tableros.
165
167
  };
166
- /** Opciones configuradas para ngx-echarts */
167
- chartOptions = {};
168
- mergeOptions = {};
169
168
  constructor() {
170
169
  this.updateSubscription = this.updateSubject.pipe(debounceTime(150)).subscribe(options => {
171
- this.updateOptions(options);
170
+ this.setOptions(options);
172
171
  });
173
172
  }
173
+ // angular hooks //
174
174
  ngOnChanges(changes) {
175
175
  this.onInputChanges(changes);
176
176
  }
@@ -178,33 +178,63 @@ class BaseEchartsComponent {
178
178
  this.updateSubscription?.unsubscribe();
179
179
  this.chartInstance?.dispose();
180
180
  }
181
+ // metodos privados //
182
+ /** setear/actualizar opciones del chart
183
+ *
184
+ * Ver: https://echarts.apache.org/en/api.html#echartsInstance.setOption
185
+ */
186
+ setOptions(chartOptions, opts) {
187
+ const notMerge = opts?.notMerge ?? true, silent = opts?.silent ?? false, replaceMerge = opts?.replaceMerge ?? [];
188
+ const _opts = {
189
+ notMerge,
190
+ silent,
191
+ replaceMerge,
192
+ };
193
+ this.chartInstance?.setOption(chartOptions, _opts);
194
+ }
195
+ // metodos protegidos //
196
+ dispatchAction(type, d) {
197
+ if (this.chartInstance == undefined)
198
+ return;
199
+ const { seriesIndex = [], dataIndex = [], } = d;
200
+ this.chartInstance.dispatchAction({
201
+ type,
202
+ seriesIndex,
203
+ dataIndex,
204
+ });
205
+ }
206
+ ;
181
207
  /**
182
- * Captura la instancia de echarts (usado por ngx-echarts)
208
+ * Hook de template method invocado por `ngOnChanges`.
209
+ * Las subclases lo sobreescriben para añadir lógica propia
210
+ * y deben llamar a `super.onInputChanges(changes)` para preservar
211
+ * el comportamiento base (detectar inputs relevantes y actualizar el chart).
183
212
  */
184
- onChartInit(instance) {
185
- this.chartInstance = instance;
186
- this.setupBaseInteractions();
187
- this.updateChartOptions({ notMerge: true });
213
+ onInputChanges(changes) {
214
+ if (changes['data'] || changes['optionsOverrides'] || changes['palette'] || changes['colorResolver'] || changes['valueFormatter']) {
215
+ this.updateChartOptions();
216
+ }
188
217
  }
189
218
  /**
190
- * Configura interacciones base como el clic en el fondo para limpiar selección.
219
+ * Gatilla actualización.
220
+ *
221
+ */
222
+ triggerUpdate(options) {
223
+ this.updateSubject.next(options);
224
+ }
225
+ // metodos publicos //
226
+ /**
227
+ * Captura la instancia de echarts (usado por ngx-echarts)
191
228
  */
192
- setupBaseInteractions() {
193
- if (!this.chartInstance)
194
- return;
195
- const zr = this.chartInstance.getZr();
196
- zr.on('click', (params) => {
197
- if (!params.target) {
198
- this.clearSelection();
199
- }
200
- });
229
+ onChartInit(instance) {
230
+ this.chartInstance = instance;
231
+ this.updateChartOptions();
201
232
  }
202
233
  onChartClick(event) {
203
234
  if (event.componentType === 'series') {
204
235
  const index = event.dataIndex;
205
236
  const seriesIndex = event.seriesIndex;
206
237
  if (index !== undefined && index >= 0) {
207
- this.handleSelection(index, seriesIndex);
208
238
  // Emit standardized payload for cross-filtering
209
239
  this.chartClick.emit({
210
240
  type: 'cross-filter',
@@ -218,70 +248,36 @@ class BaseEchartsComponent {
218
248
  }
219
249
  }
220
250
  /**
221
- * Maneja la lógica de alternancia de selección.
222
- */
223
- handleSelection(dataIndex, seriesIndex) {
224
- const isSamePoint = this.selectedCategoryIndex === dataIndex && this.selectedSeriesIndex === seriesIndex;
225
- if (isSamePoint) {
226
- this.clearSelection();
227
- }
228
- else {
229
- this.selectedCategoryIndex = dataIndex;
230
- this.selectedSeriesIndex = seriesIndex;
231
- this.updateChartOptions();
232
- }
233
- }
234
- /**
235
- * Limpia el estado de selección actual.
236
- */
237
- clearSelection() {
238
- this.selectedCategoryIndex = null;
239
- this.selectedSeriesIndex = null;
240
- this.updateChartOptions();
241
- }
242
- dispatchAction(type, d) {
243
- if (this.chartInstance == undefined)
244
- return;
245
- const { seriesIndex = [], dataIndex = [], } = d;
246
- this.chartInstance.dispatchAction({
247
- type,
248
- seriesIndex,
249
- dataIndex,
250
- });
251
- }
252
- /**
253
- * Maneja clics en la leyenda para persistir filtros.
254
- */
255
- onLegendSelectChanged(event) {
256
- if (event && event.selected) {
257
- this.currentLegendSelected = event.selected;
258
- this.updateChartOptions();
259
- }
260
- }
261
- updateOptions(options) {
262
- this.chartOptions = { ...options };
263
- this.chartInstance?.setOption(options, { notMerge: true });
264
- }
265
- /**
266
- * Hook de template method invocado por `ngOnChanges`.
267
- * Las subclases lo sobreescriben para añadir lógica propia
268
- * y deben llamar a `super.onInputChanges(changes)` para preservar
269
- * el comportamiento base (detectar inputs relevantes y actualizar el chart).
251
+ * Seleccion y des seleccion de item.
252
+ *
253
+ * Para hacer uso de esta funcion las opciones de series
254
+ * del grafico deben tener seteado 'selectMode'.
270
255
  */
271
- onInputChanges(changes) {
272
- if (changes['data'] || changes['optionsOverrides'] || changes['palette'] || changes['colorResolver'] || changes['valueFormatter']) {
273
- this.updateChartOptions({ notMerge: true });
256
+ onChartSelectChanged(event) {
257
+ const { type = '', fromActionPayload, fromAction = '', isFromClick, selected, } = event;
258
+ if (!isFromClick)
259
+ return; // avoid internal ECharts selection loop.
260
+ // limpiar seleccion
261
+ const seriesIndexes = selected.map(s => s.seriesIndex);
262
+ const dataIndexes = selected.flatMap(s => s.dataIndex.map(d => d));
263
+ const ud = {
264
+ seriesIndex: seriesIndexes,
265
+ dataIndex: dataIndexes,
266
+ };
267
+ this.dispatchAction('unselect', ud);
268
+ // seleccionar
269
+ if (fromAction == 'unselect') {
270
+ return; // avoid selection loop by same.
274
271
  }
272
+ const sd = {
273
+ seriesIndex: [fromActionPayload.seriesIndex],
274
+ dataIndex: [fromActionPayload.dataIndexInside],
275
+ };
276
+ this.dispatchAction('select', sd);
275
277
  }
276
278
  /**
277
- * Gatilla actualización en ngx-echarts
279
+ * Método público para forzar el redimensionado desde el padre
278
280
  */
279
- triggerUpdate(options) {
280
- this.updateSubject.next(options);
281
- }
282
- /**
283
- * Método público para forzar el redimensionado desde el padre
284
- */
285
281
  resize() {
286
282
  this.chartInstance?.resize();
287
283
  }
@@ -490,7 +486,7 @@ function getTooltipOptions(overrides) {
490
486
  * @param selectedSeriesIndex Index of the selected series
491
487
  * @returns Modified series array
492
488
  */
493
- function applyLineSelectionStyle$1(series, selectedCategoryIndex, selectedSeriesIndex) {
489
+ function applyLineSelectionStyle(series, selectedCategoryIndex, selectedSeriesIndex) {
494
490
  if (selectedCategoryIndex === null || !series)
495
491
  return series;
496
492
  return series.map((s, sIdx) => {
@@ -834,6 +830,26 @@ class VSECDirector {
834
830
  this.builder.addTooltip(data, overrides.tooltip);
835
831
  this.builder.addLegend();
836
832
  }
833
+ makeScatter(data, overrides, opts = {}) {
834
+ const { valueFormatter = undefined, palette = undefined, colorResolver = undefined, axisTypes = {
835
+ x: 'category',
836
+ y: 'value',
837
+ } } = opts;
838
+ this.builder.reset();
839
+ // El orden importa, primero callbacks y despues componentes.
840
+ this.builder.setValueFormatter(valueFormatter);
841
+ this.builder.setPalette(palette);
842
+ this.builder.setValueFormatter(valueFormatter);
843
+ const product = this.builder.baseProduct;
844
+ const seriesOverrides = merge$1({}, product.baseOptions.series, overrides[product.chartKey].series);
845
+ // chart components
846
+ this.builder.addCommons();
847
+ this.builder.addSeries(data, seriesOverrides);
848
+ this.builder.addXAxis(data, overrides.axis, axisTypes.x);
849
+ this.builder.addYAxis(data, overrides.axis, axisTypes.y);
850
+ this.builder.addTooltip(data, overrides.tooltip);
851
+ this.builder.addLegend();
852
+ }
837
853
  makeRing(data, overrides, opts = {}) {
838
854
  const { valueFormatter = undefined, palette = undefined, colorResolver = undefined, } = opts;
839
855
  this.builder.reset();
@@ -873,13 +889,13 @@ class EchartsRingComponent extends BaseEchartsComponent {
873
889
  emphasis: {
874
890
  scale: true,
875
891
  scaleSize: 2,
876
- itemStyle: {
877
- borderColor: '#fff',
878
- },
879
892
  },
880
893
  select: {
881
894
  itemStyle: {
882
- borderColor: '#fff',
895
+ borderColor: EChartsTokens.sBorderColor,
896
+ shadowColor: EChartsTokens.sShadowColor,
897
+ borderWidth: 1,
898
+ shadowBlur: 4,
883
899
  },
884
900
  },
885
901
  animationType: 'scale',
@@ -909,7 +925,6 @@ class EchartsRingComponent extends BaseEchartsComponent {
909
925
  this.lastSelectedSeriesIndex = null;
910
926
  this.lastSelectedDataIndex = null;
911
927
  this.selectedPercent = null;
912
- this.currentLegendSelected = null;
913
928
  this.currentGraphicText = '';
914
929
  }
915
930
  super.onInputChanges(changes);
@@ -928,11 +943,6 @@ class EchartsRingComponent extends BaseEchartsComponent {
928
943
  this.lastSelectedDataIndex = null;
929
944
  this.selectedPercent = null;
930
945
  this.setGraphicText('');
931
- this.chartInstance.dispatchAction({
932
- type: 'unselect',
933
- seriesIndex: event.seriesIndex,
934
- dataIndex: event.dataIndex
935
- });
936
946
  }
937
947
  else {
938
948
  // SELECT
@@ -961,29 +971,44 @@ class EchartsRingComponent extends BaseEchartsComponent {
961
971
  this.setGraphicText('');
962
972
  }
963
973
  }
964
- /**
965
- * Captura los cambios en la selección de la leyenda para persistirlos.
966
- */
967
- onLegendSelectChanged(event) {
968
- if (event && event.selected) {
969
- this.currentLegendSelected = event.selected;
970
- // Resetear la selección actual al cambiar el contexto de la leyenda
971
- this.lastSelectedSeriesIndex = null;
972
- this.lastSelectedDataIndex = null;
973
- this.selectedPercent = null;
974
- this.currentGraphicText = '';
975
- this.updateChartOptions();
976
- }
974
+ onChartSelectChangedParcheado(e) {
975
+ /** corrige inside data index cuando se filtran leyendas en ring.
976
+ *
977
+ * En ring, cuando se filtran leyendas, no coinciden el 'inside data index'
978
+ * con el 'selected data index'. El correcto deberia ser el 'inside data intex'
979
+ * pero en ring por algun motivo esto es distinto.
980
+ *
981
+ * apache echarts version: 5.6.0
982
+ */
983
+ const patchedEvent = (e) => {
984
+ /** selected serie index */
985
+ const ssi = e.fromActionPayload.seriesIndex;
986
+ const selected = e.selected.find(sel => sel.seriesIndex == ssi);
987
+ if (e.fromAction == 'unselect' || !selected) {
988
+ return e;
989
+ }
990
+ const fixedDataIndex = selected.dataIndex[0]; // [0] por seleccion single;
991
+ e.fromActionPayload.dataIndexInside = fixedDataIndex; // aplico corrección de index inside.
992
+ return e;
993
+ };
994
+ super.onChartSelectChanged(patchedEvent(e)); // continuo flujo convencional
977
995
  }
978
996
  /**
979
997
  * Actualiza el texto del Graphic central y persiste la selección en el modelo de opciones.
980
998
  */
981
999
  setGraphicText(text) {
982
1000
  this.currentGraphicText = text;
983
- this.updateChartOptions();
1001
+ // Persistencia de GRAPHIC (KPI central)
1002
+ this.chartInstance?.setOption({
1003
+ graphic: {
1004
+ style: {
1005
+ text: this.currentGraphicText,
1006
+ opacity: this.currentGraphicText ? 1 : 0,
1007
+ }
1008
+ }
1009
+ });
984
1010
  }
985
- updateChartOptions(opts) {
986
- const notMerge = opts?.notMerge ?? false;
1011
+ updateChartOptions() {
987
1012
  if (!this.chartInstance)
988
1013
  return;
989
1014
  if (!this.data)
@@ -996,49 +1021,18 @@ class EchartsRingComponent extends BaseEchartsComponent {
996
1021
  };
997
1022
  this.make(makeOpts);
998
1023
  // 2. Obtenemos las bases del chart usando el builder
999
- let options = this.builder.getResult();
1000
- // 3. Persistencia de GRAPHIC (KPI central)
1001
- if (options.graphic && Array.isArray(options.graphic)) {
1002
- const graphic = options.graphic[0];
1003
- if (graphic && graphic.style) {
1004
- graphic.style.text = this.currentGraphicText;
1005
- graphic.style.opacity = this.currentGraphicText ? 1 : 0;
1006
- }
1007
- }
1008
- // 4. Persistencia de SELECCIÓN (sector elevado)
1009
- if (options.series && Array.isArray(options.series)) {
1010
- options.series.forEach((s, sIdx) => {
1011
- if (s.data && Array.isArray(s.data)) {
1012
- s.data.forEach((item, dIdx) => {
1013
- if (typeof item === 'object') {
1014
- item.selected = (sIdx === this.lastSelectedSeriesIndex && dIdx === this.lastSelectedDataIndex);
1015
- }
1016
- });
1017
- }
1018
- });
1019
- }
1020
- // 5. Persistencia de LEYENDA (filtros de usuario)
1021
- if (this.currentLegendSelected && options.legend) {
1022
- options.legend = {
1023
- ...options.legend,
1024
- selected: { ...this.currentLegendSelected }
1025
- };
1026
- }
1027
- if (notMerge) {
1028
- // Gatillar actualización en ngx-echarts
1029
- this.triggerUpdate(options);
1030
- }
1031
- this.mergeOptions = { ...options };
1024
+ const options = this.builder.getResult();
1025
+ this.triggerUpdate(options);
1032
1026
  }
1033
1027
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsRingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1034
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsRingComponent, isStandalone: true, selector: "vs-echarts-ring", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" \n echarts \n [options]=\"chartOptions\" \n [initOpts]=\"initOptions\"\n [merge]=\"mergeOptions\"\n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartMouseOver)=\"onChartMouseOver($event)\" \n (chartMouseOut)=\"onChartMouseOut($event)\" \n (chartLegendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>\n ", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1028
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsRingComponent, isStandalone: true, selector: "vs-echarts-ring", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" \n echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartMouseOver)=\"onChartMouseOver($event)\" \n (chartMouseOut)=\"onChartMouseOut($event)\" \n (chartSelectChanged)=\"onChartSelectChangedParcheado($event)\"\n></div>\n ", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1035
1029
  }
1036
1030
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsRingComponent, decorators: [{
1037
1031
  type: Component,
1038
1032
  args: [{ selector: 'vs-echarts-ring', standalone: true, imports: [
1039
1033
  CommonModule,
1040
1034
  NgxEchartsDirective,
1041
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" \n echarts \n [options]=\"chartOptions\" \n [initOpts]=\"initOptions\"\n [merge]=\"mergeOptions\"\n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartMouseOver)=\"onChartMouseOver($event)\" \n (chartMouseOut)=\"onChartMouseOut($event)\" \n (chartLegendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>\n ", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1035
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" \n echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartMouseOver)=\"onChartMouseOver($event)\" \n (chartMouseOut)=\"onChartMouseOut($event)\" \n (chartSelectChanged)=\"onChartSelectChangedParcheado($event)\"\n></div>\n ", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1042
1036
  }], ctorParameters: () => [] });
1043
1037
 
1044
1038
  /**
@@ -1232,9 +1226,7 @@ class EchartsBarComponent extends BaseEchartsComponent {
1232
1226
  */
1233
1227
  baseSeriesOptions = {
1234
1228
  type: 'bar',
1235
- barMaxWidth: 50,
1236
- barGap: '15%',
1237
- barCategoryGap: '35%',
1229
+ barGap: '10%',
1238
1230
  animation: true,
1239
1231
  animationDuration: 1000,
1240
1232
  animationEasing: 'cubicOut',
@@ -1249,6 +1241,15 @@ class EchartsBarComponent extends BaseEchartsComponent {
1249
1241
  backgroundStyle: {
1250
1242
  color: 'rgba(180, 180, 180, 0.2)' // gris claro
1251
1243
  },
1244
+ selectedMode: 'single',
1245
+ select: {
1246
+ itemStyle: {
1247
+ borderWidth: 1,
1248
+ borderColor: EChartsTokens.sBorderColor,
1249
+ shadowColor: EChartsTokens.sShadowColor,
1250
+ shadowBlur: 6,
1251
+ }
1252
+ },
1252
1253
  label: {
1253
1254
  show: false,
1254
1255
  position: 'top',
@@ -1282,101 +1283,17 @@ class EchartsBarComponent extends BaseEchartsComponent {
1282
1283
  };
1283
1284
  this.make(makeBarOpts);
1284
1285
  const baseOptions = this.builder.getResult();
1285
- if (this.currentLegendSelected && baseOptions.legend) {
1286
- baseOptions.legend.selected = { ...this.currentLegendSelected };
1287
- }
1288
- if (this.selectedCategoryIndex !== null && baseOptions.series) {
1289
- const seriesArray = baseOptions.series;
1290
- baseOptions.series = seriesArray.map((s, sIdx) => {
1291
- if (s.type === 'bar' && Array.isArray(s.data)) {
1292
- return {
1293
- ...s,
1294
- emphasis: {
1295
- disabled: true
1296
- },
1297
- data: s.data.map((val, idx) => {
1298
- const isSelected = idx === this.selectedCategoryIndex;
1299
- const isBarSelected = isSelected && sIdx === this.selectedSeriesIndex;
1300
- const itemVal = (val && typeof val === 'object' && val.value !== undefined) ? val.value : val;
1301
- return {
1302
- value: itemVal,
1303
- itemStyle: {
1304
- opacity: isSelected ? (isBarSelected ? 1 : 0.5) : 0.15,
1305
- borderWidth: 0
1306
- }
1307
- };
1308
- })
1309
- };
1310
- }
1311
- return s;
1312
- });
1313
- }
1314
1286
  this.triggerUpdate(baseOptions);
1315
1287
  }
1316
- onChartInit(instance) {
1317
- super.onChartInit(instance);
1318
- this.setupAdditionalInteractions();
1319
- }
1320
- onInputChanges(changes) {
1321
- if (changes['data']) {
1322
- this.selectedCategoryIndex = null;
1323
- this.selectedSeriesIndex = null;
1324
- this.currentLegendSelected = null;
1325
- }
1326
- super.onInputChanges(changes);
1327
- }
1328
- setupAdditionalInteractions() {
1329
- if (!this.chartInstance)
1330
- return;
1331
- // 1. ZRender click para sectores de fondo (específico para barras)
1332
- const zr = this.chartInstance.getZr();
1333
- zr.on('click', (params) => {
1334
- if (!params.target) {
1335
- const pointInPixel = [params.offsetX, params.offsetY];
1336
- if (this.chartInstance.containPixel('grid', pointInPixel)) {
1337
- const xIndexResult = this.chartInstance.convertFromPixel({ xAxisIndex: 0 }, pointInPixel);
1338
- const xIndex = Array.isArray(xIndexResult) ? xIndexResult[0] : xIndexResult;
1339
- if (typeof xIndex === 'number' && xIndex >= 0) {
1340
- this.handleSelection(xIndex, -1);
1341
- }
1342
- }
1343
- }
1344
- });
1345
- }
1346
- highlightSector(index) {
1347
- if (!this.chartInstance || this.selectedCategoryIndex !== null)
1348
- return;
1349
- const seriesCount = Array.isArray(this.chartOptions.series) ? this.chartOptions.series.length : 0;
1350
- this.chartInstance.dispatchAction({
1351
- type: 'highlight',
1352
- seriesIndex: Array.from({ length: seriesCount }, (_, i) => i),
1353
- dataIndex: index
1354
- });
1355
- }
1356
- clearHighlight() {
1357
- if (!this.chartInstance)
1358
- return;
1359
- const seriesCount = Array.isArray(this.chartOptions.series) ? this.chartOptions.series.length : 0;
1360
- this.chartInstance.dispatchAction({
1361
- type: 'downplay',
1362
- seriesIndex: Array.from({ length: seriesCount }, (_, i) => i)
1363
- });
1364
- }
1365
- onLegendSelectChanged(event) {
1366
- if (event && event.selected) {
1367
- this.currentLegendSelected = event.selected;
1368
- this.updateChartOptions();
1369
- }
1370
- }
1371
1288
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1372
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsBarComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsBarComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1373
1290
  }
1374
1291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsBarComponent, decorators: [{
1375
1292
  type: Component,
1376
1293
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1377
1294
  CommonModule,
1378
1295
  NgxEchartsDirective,
1379
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1296
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1380
1297
  }], ctorParameters: () => [] });
1381
1298
 
1382
1299
  class EChartsHBarComponent extends EchartsBarComponent {
@@ -1402,14 +1319,14 @@ class EChartsHBarComponent extends EchartsBarComponent {
1402
1319
  this.director.makeBar(this.data, this.optionsOverrides, makeOpts);
1403
1320
  }
1404
1321
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsHBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1405
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsHBarComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1322
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsHBarComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1406
1323
  }
1407
1324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsHBarComponent, decorators: [{
1408
1325
  type: Component,
1409
1326
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1410
1327
  CommonModule,
1411
1328
  NgxEchartsDirective,
1412
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1329
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1413
1330
  }] });
1414
1331
 
1415
1332
  class EChartsBarStackedComponent extends EchartsBarComponent {
@@ -1432,14 +1349,14 @@ class EChartsBarStackedComponent extends EchartsBarComponent {
1432
1349
  builder = new EChartBuilder(this.variantBaseProduct);
1433
1350
  director = new VSECDirector(this.builder);
1434
1351
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsBarStackedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1435
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsBarStackedComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1352
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsBarStackedComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1436
1353
  }
1437
1354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsBarStackedComponent, decorators: [{
1438
1355
  type: Component,
1439
1356
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1440
1357
  CommonModule,
1441
1358
  NgxEchartsDirective,
1442
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1359
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1443
1360
  }] });
1444
1361
 
1445
1362
  class EChartsHBarStackedComponent extends EchartsBarComponent {
@@ -1469,14 +1386,14 @@ class EChartsHBarStackedComponent extends EchartsBarComponent {
1469
1386
  this.director.makeBar(this.data, this.optionsOverrides, makeOpts);
1470
1387
  }
1471
1388
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsHBarStackedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1472
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsHBarStackedComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1389
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsHBarStackedComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1473
1390
  }
1474
1391
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsHBarStackedComponent, decorators: [{
1475
1392
  type: Component,
1476
1393
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1477
1394
  CommonModule,
1478
1395
  NgxEchartsDirective,
1479
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1396
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1480
1397
  }] });
1481
1398
 
1482
1399
  class EChartsBarStackedRadialComponent extends EchartsBarComponent {
@@ -1503,90 +1420,16 @@ class EChartsBarStackedRadialComponent extends EchartsBarComponent {
1503
1420
  this.director.makeBarRadial(this.data, this.optionsOverrides, makeOpts);
1504
1421
  }
1505
1422
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsBarStackedRadialComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1506
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsBarStackedRadialComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1423
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsBarStackedRadialComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1507
1424
  }
1508
1425
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsBarStackedRadialComponent, decorators: [{
1509
1426
  type: Component,
1510
1427
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1511
1428
  CommonModule,
1512
1429
  NgxEchartsDirective,
1513
- ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts [initOpts]=\"initOptions\" [options]=\"chartOptions\" [autoResize]=\"true\" (chartInit)=\"onChartInit($event)\" (chartClick)=\"onChartClick($event)\" (legendSelectChanged)=\"onLegendSelectChanged($event)\"></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1430
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1514
1431
  }] });
1515
1432
 
1516
- /**
1517
- * Applies a visual selection effect to line-based series.
1518
- * Highlights the selected series and point, and dims everything else.
1519
- *
1520
- * @param series The series array to modify
1521
- * @param selectedCategoryIndex Index of the selected category
1522
- * @param selectedSeriesIndex Index of the selected series
1523
- * @returns Modified series array
1524
- */
1525
- function applyLineSelectionStyle(series, selectedCategoryIndex, selectedSeriesIndex) {
1526
- if (selectedCategoryIndex === null || !series)
1527
- return series;
1528
- return series.map((s, sIdx) => {
1529
- const isSelectedSeries = sIdx === selectedSeriesIndex;
1530
- // Serie seleccionada: Línea con opacidad 1 para que destaque la tendencia.
1531
- // Serie NO seleccionada: Opacidad 0.20 para atenuar fuertemente.
1532
- const seriesOpacity = isSelectedSeries ? 1 : 0.20;
1533
- return {
1534
- ...s,
1535
- emphasis: {
1536
- disabled: true // Deshabilitar el énfasis (hover) cuando hay una selección activa
1537
- },
1538
- itemStyle: {
1539
- ...s.itemStyle,
1540
- opacity: seriesOpacity
1541
- },
1542
- lineStyle: {
1543
- ...s.lineStyle,
1544
- opacity: seriesOpacity
1545
- },
1546
- ...(s.areaStyle ? {
1547
- areaStyle: {
1548
- ...s.areaStyle,
1549
- opacity: isSelectedSeries ? 0.6 : 0.1
1550
- }
1551
- } : {}),
1552
- // Personalizamos los puntos individualmente
1553
- data: (s.data || []).map((val, idx) => {
1554
- const isSelectedPoint = isSelectedSeries && idx === selectedCategoryIndex;
1555
- const isOtherPointInSelectedSeries = isSelectedSeries && idx !== selectedCategoryIndex;
1556
- const originalPoint = (val && typeof val === 'object') ? val : { value: val };
1557
- if (isSelectedPoint) {
1558
- return {
1559
- ...originalPoint,
1560
- z: 10, // Asegurar que el punto seleccionado esté por encima de los demás
1561
- itemStyle: {
1562
- ...originalPoint.itemStyle,
1563
- opacity: 1,
1564
- borderWidth: 2,
1565
- borderColor: '#fff',
1566
- shadowBlur: 10,
1567
- shadowColor: 'rgba(0,0,0,0.5)'
1568
- },
1569
- symbolSize: 12
1570
- };
1571
- }
1572
- else if (isOtherPointInSelectedSeries) {
1573
- // Puntos de la serie seleccionada que NO son el clicado: un poco más pequeños y traslúcidos
1574
- return {
1575
- ...originalPoint,
1576
- itemStyle: {
1577
- ...originalPoint.itemStyle,
1578
- opacity: 0.5
1579
- },
1580
- symbolSize: 6
1581
- };
1582
- }
1583
- // Puntos de otras series o por defecto
1584
- return val;
1585
- })
1586
- };
1587
- });
1588
- }
1589
-
1590
1433
  class EchartsLineComponent extends BaseEchartsComponent {
1591
1434
  baseSeriesOptions = {
1592
1435
  type: 'line',
@@ -1595,10 +1438,11 @@ class EchartsLineComponent extends BaseEchartsComponent {
1595
1438
  animationEasing: 'cubicOut',
1596
1439
  smooth: true,
1597
1440
  smoothMonotone: 'x',
1441
+ symbol: 'emptyCircle',
1598
1442
  symbolSize: 6,
1599
1443
  itemStyle: {
1600
1444
  shadowColor: 'rgba(0, 0, 0, 0.2)',
1601
- shadowBlur: 5,
1445
+ shadowBlur: 4,
1602
1446
  shadowOffsetY: 2,
1603
1447
  },
1604
1448
  lineStyle: {
@@ -1611,15 +1455,19 @@ class EchartsLineComponent extends BaseEchartsComponent {
1611
1455
  },
1612
1456
  emphasis: {
1613
1457
  focus: 'none',
1614
- itemStyle: {
1615
- borderWidth: 2,
1616
- shadowBlur: 10,
1617
- },
1618
1458
  lineStyle: {
1619
1459
  width: 4,
1620
- shadowBlur: 12,
1460
+ shadowBlur: 10,
1621
1461
  }
1622
1462
  },
1463
+ selectedMode: 'single',
1464
+ select: {
1465
+ itemStyle: {
1466
+ color: 'rgba(255, 255, 255, 1)',
1467
+ borderCap: 'round',
1468
+ borderWidth: 8,
1469
+ },
1470
+ },
1623
1471
  };
1624
1472
  baseProduct = {
1625
1473
  chartKey: 'line',
@@ -1632,14 +1480,6 @@ class EchartsLineComponent extends BaseEchartsComponent {
1632
1480
  constructor() {
1633
1481
  super();
1634
1482
  }
1635
- onInputChanges(changes) {
1636
- if (changes['data']) {
1637
- this.selectedCategoryIndex = null;
1638
- this.selectedSeriesIndex = null;
1639
- this.currentLegendSelected = null;
1640
- }
1641
- super.onInputChanges(changes);
1642
- }
1643
1483
  make(makeOpts) {
1644
1484
  this.director.makeLine(this.data, this.optionsOverrides, makeOpts);
1645
1485
  }
@@ -1648,7 +1488,6 @@ class EchartsLineComponent extends BaseEchartsComponent {
1648
1488
  return;
1649
1489
  if (!this.data)
1650
1490
  return;
1651
- // 1.
1652
1491
  const makeBarOpts = {
1653
1492
  valueFormatter: this.valueFormatter,
1654
1493
  palette: this.palette,
@@ -1656,20 +1495,12 @@ class EchartsLineComponent extends BaseEchartsComponent {
1656
1495
  };
1657
1496
  this.make(makeBarOpts);
1658
1497
  const baseOptions = this.builder.getResult();
1659
- // 2. Re-apply legend selection state if exists
1660
- if (this.currentLegendSelected && baseOptions.legend) {
1661
- baseOptions.legend.selected = { ...this.currentLegendSelected };
1662
- }
1663
- //3. Apply persistent selection style if a point is selected
1664
- if (this.selectedCategoryIndex !== null && baseOptions.series) {
1665
- baseOptions.series = applyLineSelectionStyle(baseOptions.series, this.selectedCategoryIndex, this.selectedSeriesIndex);
1666
- }
1667
1498
  this.triggerUpdate(baseOptions);
1668
1499
  }
1669
1500
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1670
1501
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsLineComponent, isStandalone: true, selector: "vs-echarts-line", providers: [
1671
1502
  provideVSEcharts(),
1672
- ], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1503
+ ], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1673
1504
  }
1674
1505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsLineComponent, decorators: [{
1675
1506
  type: Component,
@@ -1678,7 +1509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
1678
1509
  NgxEchartsDirective,
1679
1510
  ], providers: [
1680
1511
  provideVSEcharts(),
1681
- ], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1512
+ ], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1682
1513
  }], ctorParameters: () => [] });
1683
1514
 
1684
1515
  class EChartsAreaComponent extends EchartsLineComponent {
@@ -1695,14 +1526,14 @@ class EChartsAreaComponent extends EchartsLineComponent {
1695
1526
  builder = new EChartBuilder(this.variantBaseProduct);
1696
1527
  director = new VSECDirector(this.builder);
1697
1528
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1698
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsAreaComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1529
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsAreaComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1699
1530
  }
1700
1531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsAreaComponent, decorators: [{
1701
1532
  type: Component,
1702
1533
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1703
1534
  CommonModule,
1704
1535
  NgxEchartsDirective,
1705
- ], providers: [provideVSEcharts()], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1536
+ ], providers: [provideVSEcharts()], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1706
1537
  }] });
1707
1538
 
1708
1539
  class EChartsAreaStackComponent extends EchartsLineComponent {
@@ -1720,16 +1551,89 @@ class EChartsAreaStackComponent extends EchartsLineComponent {
1720
1551
  builder = new EChartBuilder(this.variantBaseProduct);
1721
1552
  director = new VSECDirector(this.builder);
1722
1553
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsAreaStackComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1723
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsAreaStackComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1554
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EChartsAreaStackComponent, isStandalone: true, selector: "vs-echarts-bar", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1724
1555
  }
1725
1556
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EChartsAreaStackComponent, decorators: [{
1726
1557
  type: Component,
1727
1558
  args: [{ selector: 'vs-echarts-bar', standalone: true, imports: [
1728
1559
  CommonModule,
1729
1560
  NgxEchartsDirective,
1730
- ], providers: [provideVSEcharts()], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"chartOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (legendSelectChanged)=\"onLegendSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1561
+ ], providers: [provideVSEcharts()], template: "<div\n class=\"echarts-container\"\n echarts\n [options]=\"{}\"\n [initOpts]=\"initOptions\"\n [autoResize]=\"true\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1731
1562
  }] });
1732
1563
 
1564
+ class EchartsScatterComponent extends BaseEchartsComponent {
1565
+ /**
1566
+ * Opciones esenciales inmutables estáticas comunes a todos los charts de dispersión.
1567
+ */
1568
+ baseSeriesOptions = {
1569
+ type: 'scatter',
1570
+ animation: true,
1571
+ animationDuration: 1000,
1572
+ animationEasing: 'cubicOut',
1573
+ symbol: 'circle',
1574
+ symbolSize: 6,
1575
+ itemStyle: {
1576
+ shadowColor: 'rgba(0, 0, 0, 0.1)',
1577
+ shadowBlur: 4,
1578
+ shadowOffsetY: 2,
1579
+ },
1580
+ emphasis: {
1581
+ focus: 'none',
1582
+ scale: true,
1583
+ },
1584
+ selectedMode: 'single',
1585
+ select: {
1586
+ itemStyle: {
1587
+ borderWidth: 2,
1588
+ borderColor: EChartsTokens.sBorderColor,
1589
+ shadowColor: EChartsTokens.sShadowColor,
1590
+ shadowBlur: 6,
1591
+ }
1592
+ },
1593
+ label: {
1594
+ show: false,
1595
+ position: 'top',
1596
+ }
1597
+ };
1598
+ baseProduct = {
1599
+ chartKey: 'scatter',
1600
+ baseOptions: {
1601
+ series: this.baseSeriesOptions,
1602
+ }
1603
+ };
1604
+ builder = new EChartBuilder(this.baseProduct);
1605
+ director = new VSECDirector(this.builder);
1606
+ constructor() {
1607
+ super();
1608
+ }
1609
+ make(makeOpts) {
1610
+ this.director.makeScatter(this.data, this.optionsOverrides, makeOpts);
1611
+ }
1612
+ updateChartOptions() {
1613
+ if (!this.chartInstance)
1614
+ return;
1615
+ if (!this.data)
1616
+ return;
1617
+ const makeScatterOpts = {
1618
+ valueFormatter: this.valueFormatter,
1619
+ palette: this.palette,
1620
+ colorResolver: this.colorResolver,
1621
+ };
1622
+ this.make(makeScatterOpts);
1623
+ const baseOptions = this.builder.getResult();
1624
+ this.triggerUpdate(baseOptions);
1625
+ }
1626
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsScatterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1627
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: EchartsScatterComponent, isStandalone: true, selector: "vs-echarts-scatter", providers: [provideVSEcharts()], usesInheritance: true, ngImport: i0, template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }] });
1628
+ }
1629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: EchartsScatterComponent, decorators: [{
1630
+ type: Component,
1631
+ args: [{ selector: 'vs-echarts-scatter', standalone: true, imports: [
1632
+ CommonModule,
1633
+ NgxEchartsDirective,
1634
+ ], providers: [provideVSEcharts()], template: "<div class=\"echarts-container\" echarts \n [options]=\"{}\"\n [initOpts]=\"initOptions\" \n [autoResize]=\"true\" \n (chartInit)=\"onChartInit($event)\" \n (chartClick)=\"onChartClick($event)\" \n (chartSelectChanged)=\"onChartSelectChanged($event)\"\n></div>\n", styles: [".echarts-container{width:100%;height:100%;position:relative}\n"] }]
1635
+ }], ctorParameters: () => [] });
1636
+
1733
1637
  // Interfaces de Inputs de Base EChart Component //
1734
1638
 
1735
1639
  ;
@@ -1744,5 +1648,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
1744
1648
  * Generated bundle index. Do not edit.
1745
1649
  */
1746
1650
 
1747
- export { BaseEchartsComponent, EChartsAreaComponent, EChartsAreaStackComponent, EChartsBarStackedComponent, EChartsBarStackedRadialComponent, EChartsHBarComponent, EChartsHBarStackedComponent, EchartsBarComponent, EchartsLineComponent, EchartsRingComponent, defaultOptionsOverrides, initializeEcharts, provideVSEcharts };
1651
+ export { BaseEchartsComponent, EChartsAreaComponent, EChartsAreaStackComponent, EChartsBarStackedComponent, EChartsBarStackedRadialComponent, EChartsHBarComponent, EChartsHBarStackedComponent, EchartsBarComponent, EchartsLineComponent, EchartsRingComponent, EchartsScatterComponent, defaultOptionsOverrides, initializeEcharts, provideVSEcharts };
1748
1652
  //# sourceMappingURL=visionaris-bruno-vs-echarts.mjs.map