@vaadin/vaadin-charts 6.3.2 → 6.3.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.
Files changed (2) hide show
  1. package/package.json +9 -7
  2. package/src/vaadin-chart.js +22 -43
package/package.json CHANGED
@@ -10,10 +10,11 @@
10
10
  "repository": "vaadin/vaadin-charts",
11
11
  "homepage": "https://vaadin.com/charts",
12
12
  "name": "@vaadin/vaadin-charts",
13
- "version": "6.3.2",
13
+ "version": "6.3.4",
14
14
  "main": "vaadin-chart.js",
15
15
  "author": "Vaadin Ltd",
16
16
  "license": "SEE LICENSE IN LICENSE.txt",
17
+ "cvdlName": "vaadin-chart",
17
18
  "bugs": {
18
19
  "url": "https://github.com/vaadin/vaadin-charts/issues"
19
20
  },
@@ -23,8 +24,6 @@
23
24
  "theme"
24
25
  ],
25
26
  "resolutions": {
26
- "es-abstract": "1.17.6",
27
- "@types/doctrine": "0.0.3",
28
27
  "inherits": "2.0.3",
29
28
  "samsam": "1.1.3",
30
29
  "supports-color": "3.1.2",
@@ -37,10 +36,9 @@
37
36
  "@vaadin/vaadin-license-checker": "^2.1.0",
38
37
  "@vaadin/vaadin-element-mixin": "^2.3.2"
39
38
  },
40
- "scripts": {
41
- "generate-typings": "gen-typescript-declarations --outDir . --verify"
42
- },
43
- "devDependencies": {
39
+ "devDependencies": {
40
+ "@web-padawan/gen-typescript-declarations": "^1.6.2",
41
+ "web-component-tester": "6.9.2",
44
42
  "@polymer/iron-component-page": "^4.0.0",
45
43
  "@webcomponents/webcomponentsjs": "^2.0.0",
46
44
  "wct-browser-legacy": "^1.0.1",
@@ -56,5 +54,9 @@
56
54
  "@vaadin/vaadin-icons": "^4.2.0",
57
55
  "@vaadin/vaadin-button": "^2.3.0-alpha1",
58
56
  "@vaadin/vaadin-ordered-layout": "^1.3.0"
57
+ },
58
+ "scripts": {
59
+ "generate-typings": "gen-typescript-declarations --outDir . --verify",
60
+ "test": "wct --npm"
59
61
  }
60
62
  }
@@ -369,26 +369,6 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
369
369
  :host([hidden]) {
370
370
  display: none !important;
371
371
  }
372
-
373
- /* https://github.com/highcharts/highcharts/issues/4649 */
374
- /* https://github.com/vaadin/web-components/issues/2171 */
375
- .highcharts-container svg {
376
- width: 100% !important;
377
- }
378
-
379
- :host(.ff-lt-68) {
380
- position: relative;
381
- height: 400px;
382
- }
383
-
384
- :host(.ff-lt-68) #chart {
385
- position: absolute;
386
- top: 0;
387
- bottom: 0;
388
- left: 0;
389
- right: 0;
390
- overflow: hidden;
391
- }
392
372
  </style>
393
373
  <div id="chart"></div>
394
374
  <slot id="slot"></slot>
@@ -400,7 +380,11 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
400
380
  }
401
381
 
402
382
  static get version() {
403
- return '6.3.2';
383
+ return '6.3.4';
384
+ }
385
+
386
+ static get cvdlName() {
387
+ return 'vaadin-chart';
404
388
  }
405
389
 
406
390
  static get properties() {
@@ -605,15 +589,6 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
605
589
  constructor() {
606
590
  super();
607
591
 
608
- const isFirefox = window.navigator.userAgent.match(/Firefox\/([0-9]+)\./);
609
- if (isFirefox) {
610
- const fireFoxVersion = parseInt(isFirefox[1], 10);
611
-
612
- if (fireFoxVersion < 68) {
613
- this.classList.add('ff-lt-68');
614
- }
615
- }
616
-
617
592
  /**
618
593
  * List of properties that will always be copied from the chart element to the container div
619
594
  **/
@@ -1079,11 +1054,13 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
1079
1054
  this.__setYAxisProps(yAxes, unit, {max: valueMax});
1080
1055
  }
1081
1056
 
1082
- const seriesConfiguration = this.__updateOrAddSeriesInstance(seriesElement.options, idxOnChildList);
1057
+ const seriesConfiguration = this.__updateOrAddSeriesInstance(seriesElement.options, idxOnChildList, false);
1083
1058
 
1084
1059
  seriesElement.setSeries(seriesConfiguration);
1085
1060
  }
1086
1061
  this.__removeAxisIfEmpty();
1062
+
1063
+ this.configuration.redraw();
1087
1064
  }
1088
1065
 
1089
1066
  __removeSeries(seriesNodes) {
@@ -1264,20 +1241,22 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
1264
1241
  return;
1265
1242
  }
1266
1243
 
1267
- this.configuration.update(this._jsonConfigurationBuffer);
1244
+ this.configuration.update(this._jsonConfigurationBuffer, false);
1268
1245
  if (this._jsonConfigurationBuffer.credits) {
1269
1246
  this.__updateOrAddCredits(this._jsonConfigurationBuffer.credits);
1270
1247
  }
1271
1248
  if (this._jsonConfigurationBuffer.xAxis) {
1272
- this.__updateOrAddAxes(this._jsonConfigurationBuffer.xAxis, true);
1249
+ this.__updateOrAddAxes(this._jsonConfigurationBuffer.xAxis, true, false);
1273
1250
  }
1274
1251
  if (this._jsonConfigurationBuffer.yAxis) {
1275
- this.__updateOrAddAxes(this._jsonConfigurationBuffer.yAxis, false);
1252
+ this.__updateOrAddAxes(this._jsonConfigurationBuffer.yAxis, false, false);
1276
1253
  }
1277
1254
  if (this._jsonConfigurationBuffer.series) {
1278
- this.__updateOrAddSeries(this._jsonConfigurationBuffer.series);
1255
+ this.__updateOrAddSeries(this._jsonConfigurationBuffer.series, false);
1279
1256
  }
1280
1257
  this._jsonConfigurationBuffer = null;
1258
+
1259
+ this.configuration.redraw();
1281
1260
  });
1282
1261
  }
1283
1262
 
@@ -1499,7 +1478,7 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
1499
1478
  }
1500
1479
  }
1501
1480
 
1502
- __updateOrAddAxes(axes, isX) {
1481
+ __updateOrAddAxes(axes, isX, redraw) {
1503
1482
  if (!Array.isArray(axes)) {
1504
1483
  axes = [axes];
1505
1484
  }
@@ -1507,28 +1486,28 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
1507
1486
  for (let i = 0; i < axes.length; i++) {
1508
1487
  const axis = axes[i];
1509
1488
  if (confAxes[i]) {
1510
- confAxes[i].update(axis);
1489
+ confAxes[i].update(axis, redraw);
1511
1490
  } else {
1512
- this.configuration.addAxis(axis, isX);
1491
+ this.configuration.addAxis(axis, isX, redraw);
1513
1492
  }
1514
1493
  }
1515
1494
  }
1516
1495
 
1517
- __updateOrAddSeries(series) {
1496
+ __updateOrAddSeries(series, redraw) {
1518
1497
  if (!Array.isArray(series)) {
1519
1498
  throw new Error('The type of jsonConfiguration.series should be Object[]');
1520
1499
  }
1521
1500
  for (let i = 0; i < series.length; i++) {
1522
1501
  const currentSeries = series[i];
1523
- this.__updateOrAddSeriesInstance(currentSeries, i);
1502
+ this.__updateOrAddSeriesInstance(currentSeries, i, redraw);
1524
1503
  }
1525
1504
  }
1526
1505
 
1527
- __updateOrAddSeriesInstance(seriesOptions, position) {
1506
+ __updateOrAddSeriesInstance(seriesOptions, position, redraw) {
1528
1507
  if (this.configuration.series[position]) {
1529
- this.configuration.series[position].update(seriesOptions);
1508
+ this.configuration.series[position].update(seriesOptions, redraw);
1530
1509
  } else {
1531
- this.configuration.addSeries(seriesOptions);
1510
+ this.configuration.addSeries(seriesOptions, redraw);
1532
1511
  }
1533
1512
  return this.configuration.series[position];
1534
1513
  }