@vaadin/charts 24.6.0-alpha7 → 24.6.0-alpha9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/charts",
3
- "version": "24.6.0-alpha7",
3
+ "version": "24.6.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,14 +36,14 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "24.6.0-alpha7",
40
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha7",
41
- "@vaadin/vaadin-material-styles": "24.6.0-alpha7",
42
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha7",
39
+ "@vaadin/component-base": "24.6.0-alpha9",
40
+ "@vaadin/vaadin-lumo-styles": "24.6.0-alpha9",
41
+ "@vaadin/vaadin-material-styles": "24.6.0-alpha9",
42
+ "@vaadin/vaadin-themable-mixin": "24.6.0-alpha9",
43
43
  "highcharts": "9.2.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/chai-plugins": "24.6.0-alpha7",
46
+ "@vaadin/chai-plugins": "24.6.0-alpha9",
47
47
  "@vaadin/testing-helpers": "^1.0.0",
48
48
  "sinon": "^18.0.0"
49
49
  },
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "675d6fe0a08b8cc63ac00140c63f28fc3f52e4ea"
55
+ "gitHead": "e303d77ba20c3089c9998be9a318733d9ec5b53c"
56
56
  }
@@ -331,7 +331,7 @@ class ChartSeries extends PolymerElement {
331
331
 
332
332
  /** @private */
333
333
  __valueMinObserver(valueMin, series) {
334
- if (valueMin === undefined || series === undefined) {
334
+ if (valueMin === undefined || series == null) {
335
335
  return;
336
336
  }
337
337
 
@@ -340,7 +340,7 @@ class ChartSeries extends PolymerElement {
340
340
 
341
341
  /** @private */
342
342
  __valueMaxObserver(valueMax, series) {
343
- if (valueMax === undefined || series === undefined) {
343
+ if (valueMax === undefined || series == null) {
344
344
  return;
345
345
  }
346
346
 
@@ -356,7 +356,7 @@ class ChartSeries extends PolymerElement {
356
356
 
357
357
  /** @private */
358
358
  __titleObserver(title, series) {
359
- if (title === undefined || series === undefined) {
359
+ if (title === undefined || series == null) {
360
360
  return;
361
361
  }
362
362
  series.update({ name: title });
@@ -364,7 +364,7 @@ class ChartSeries extends PolymerElement {
364
364
 
365
365
  /** @private */
366
366
  __stackObserver(stack, series) {
367
- if (stack === undefined || series === undefined) {
367
+ if (stack === undefined || series == null) {
368
368
  return;
369
369
  }
370
370
  series.update({ stack });
@@ -372,7 +372,7 @@ class ChartSeries extends PolymerElement {
372
372
 
373
373
  /** @private */
374
374
  __neckPositionObserver(neckPosition, series) {
375
- if (neckPosition === undefined || series === undefined) {
375
+ if (neckPosition === undefined || series == null) {
376
376
  return;
377
377
  }
378
378
 
@@ -381,7 +381,7 @@ class ChartSeries extends PolymerElement {
381
381
 
382
382
  /** @private */
383
383
  __neckWidthObserver(neckWidth, series) {
384
- if (neckWidth === undefined || series === undefined) {
384
+ if (neckWidth === undefined || series == null) {
385
385
  return;
386
386
  }
387
387
 
@@ -425,7 +425,7 @@ class ChartSeries extends PolymerElement {
425
425
 
426
426
  /** @private */
427
427
  __markersObserver(markers, series) {
428
- if (markers === undefined || series === undefined) {
428
+ if (markers === undefined || series == null) {
429
429
  return;
430
430
  }
431
431
 
@@ -1078,14 +1078,26 @@ class Chart extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))) {
1078
1078
  disconnectedCallback() {
1079
1079
  super.disconnectedCallback();
1080
1080
 
1081
- if (this.configuration) {
1082
- this.configuration.destroy();
1083
- this.configuration = undefined;
1084
- }
1081
+ queueMicrotask(() => {
1082
+ if (this.isConnected) {
1083
+ return;
1084
+ }
1085
1085
 
1086
- if (this._childObserver) {
1087
- this._childObserver.disconnect();
1088
- }
1086
+ if (this.configuration) {
1087
+ this.configuration.destroy();
1088
+ this.configuration = undefined;
1089
+
1090
+ // Reset series objects to avoid errors while detached
1091
+ const seriesNodes = Array.from(this.childNodes).filter(this.__filterSeriesNodes);
1092
+ seriesNodes.forEach((series) => {
1093
+ series.setSeries(null);
1094
+ });
1095
+ }
1096
+
1097
+ if (this._childObserver) {
1098
+ this._childObserver.disconnect();
1099
+ }
1100
+ });
1089
1101
  }
1090
1102
 
1091
1103
  /** @private */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/charts",
4
- "version": "24.6.0-alpha7",
4
+ "version": "24.6.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/charts",
4
- "version": "24.6.0-alpha7",
4
+ "version": "24.6.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {