@vaadin/vaadin-charts 6.3.2 → 6.3.3
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 +1 -1
- package/src/vaadin-chart.js +18 -43
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "vaadin/vaadin-charts",
|
|
11
11
|
"homepage": "https://vaadin.com/charts",
|
|
12
12
|
"name": "@vaadin/vaadin-charts",
|
|
13
|
-
"version": "6.3.
|
|
13
|
+
"version": "6.3.3",
|
|
14
14
|
"main": "vaadin-chart.js",
|
|
15
15
|
"author": "Vaadin Ltd",
|
|
16
16
|
"license": "SEE LICENSE IN LICENSE.txt",
|
package/src/vaadin-chart.js
CHANGED
|
@@ -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,7 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
400
380
|
}
|
|
401
381
|
|
|
402
382
|
static get version() {
|
|
403
|
-
return '6.3.
|
|
383
|
+
return '6.3.3';
|
|
404
384
|
}
|
|
405
385
|
|
|
406
386
|
static get properties() {
|
|
@@ -605,15 +585,6 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
605
585
|
constructor() {
|
|
606
586
|
super();
|
|
607
587
|
|
|
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
588
|
/**
|
|
618
589
|
* List of properties that will always be copied from the chart element to the container div
|
|
619
590
|
**/
|
|
@@ -1079,11 +1050,13 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
1079
1050
|
this.__setYAxisProps(yAxes, unit, {max: valueMax});
|
|
1080
1051
|
}
|
|
1081
1052
|
|
|
1082
|
-
const seriesConfiguration = this.__updateOrAddSeriesInstance(seriesElement.options, idxOnChildList);
|
|
1053
|
+
const seriesConfiguration = this.__updateOrAddSeriesInstance(seriesElement.options, idxOnChildList, false);
|
|
1083
1054
|
|
|
1084
1055
|
seriesElement.setSeries(seriesConfiguration);
|
|
1085
1056
|
}
|
|
1086
1057
|
this.__removeAxisIfEmpty();
|
|
1058
|
+
|
|
1059
|
+
this.configuration.redraw();
|
|
1087
1060
|
}
|
|
1088
1061
|
|
|
1089
1062
|
__removeSeries(seriesNodes) {
|
|
@@ -1264,20 +1237,22 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
1264
1237
|
return;
|
|
1265
1238
|
}
|
|
1266
1239
|
|
|
1267
|
-
this.configuration.update(this._jsonConfigurationBuffer);
|
|
1240
|
+
this.configuration.update(this._jsonConfigurationBuffer, false);
|
|
1268
1241
|
if (this._jsonConfigurationBuffer.credits) {
|
|
1269
1242
|
this.__updateOrAddCredits(this._jsonConfigurationBuffer.credits);
|
|
1270
1243
|
}
|
|
1271
1244
|
if (this._jsonConfigurationBuffer.xAxis) {
|
|
1272
|
-
this.__updateOrAddAxes(this._jsonConfigurationBuffer.xAxis, true);
|
|
1245
|
+
this.__updateOrAddAxes(this._jsonConfigurationBuffer.xAxis, true, false);
|
|
1273
1246
|
}
|
|
1274
1247
|
if (this._jsonConfigurationBuffer.yAxis) {
|
|
1275
|
-
this.__updateOrAddAxes(this._jsonConfigurationBuffer.yAxis, false);
|
|
1248
|
+
this.__updateOrAddAxes(this._jsonConfigurationBuffer.yAxis, false, false);
|
|
1276
1249
|
}
|
|
1277
1250
|
if (this._jsonConfigurationBuffer.series) {
|
|
1278
|
-
this.__updateOrAddSeries(this._jsonConfigurationBuffer.series);
|
|
1251
|
+
this.__updateOrAddSeries(this._jsonConfigurationBuffer.series, false);
|
|
1279
1252
|
}
|
|
1280
1253
|
this._jsonConfigurationBuffer = null;
|
|
1254
|
+
|
|
1255
|
+
this.configuration.redraw();
|
|
1281
1256
|
});
|
|
1282
1257
|
}
|
|
1283
1258
|
|
|
@@ -1499,7 +1474,7 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
1499
1474
|
}
|
|
1500
1475
|
}
|
|
1501
1476
|
|
|
1502
|
-
__updateOrAddAxes(axes, isX) {
|
|
1477
|
+
__updateOrAddAxes(axes, isX, redraw) {
|
|
1503
1478
|
if (!Array.isArray(axes)) {
|
|
1504
1479
|
axes = [axes];
|
|
1505
1480
|
}
|
|
@@ -1507,28 +1482,28 @@ class ChartElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
1507
1482
|
for (let i = 0; i < axes.length; i++) {
|
|
1508
1483
|
const axis = axes[i];
|
|
1509
1484
|
if (confAxes[i]) {
|
|
1510
|
-
confAxes[i].update(axis);
|
|
1485
|
+
confAxes[i].update(axis, redraw);
|
|
1511
1486
|
} else {
|
|
1512
|
-
this.configuration.addAxis(axis, isX);
|
|
1487
|
+
this.configuration.addAxis(axis, isX, redraw);
|
|
1513
1488
|
}
|
|
1514
1489
|
}
|
|
1515
1490
|
}
|
|
1516
1491
|
|
|
1517
|
-
__updateOrAddSeries(series) {
|
|
1492
|
+
__updateOrAddSeries(series, redraw) {
|
|
1518
1493
|
if (!Array.isArray(series)) {
|
|
1519
1494
|
throw new Error('The type of jsonConfiguration.series should be Object[]');
|
|
1520
1495
|
}
|
|
1521
1496
|
for (let i = 0; i < series.length; i++) {
|
|
1522
1497
|
const currentSeries = series[i];
|
|
1523
|
-
this.__updateOrAddSeriesInstance(currentSeries, i);
|
|
1498
|
+
this.__updateOrAddSeriesInstance(currentSeries, i, redraw);
|
|
1524
1499
|
}
|
|
1525
1500
|
}
|
|
1526
1501
|
|
|
1527
|
-
__updateOrAddSeriesInstance(seriesOptions, position) {
|
|
1502
|
+
__updateOrAddSeriesInstance(seriesOptions, position, redraw) {
|
|
1528
1503
|
if (this.configuration.series[position]) {
|
|
1529
|
-
this.configuration.series[position].update(seriesOptions);
|
|
1504
|
+
this.configuration.series[position].update(seriesOptions, redraw);
|
|
1530
1505
|
} else {
|
|
1531
|
-
this.configuration.addSeries(seriesOptions);
|
|
1506
|
+
this.configuration.addSeries(seriesOptions, redraw);
|
|
1532
1507
|
}
|
|
1533
1508
|
return this.configuration.series[position];
|
|
1534
1509
|
}
|