@vizabi/bubblechart 3.13.2 → 3.14.2

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,4 +1,4 @@
1
- // https://github.com/vizabi/bubblechart#readme v3.13.2 build 1642697876953 Copyright 2022 Gapminder Foundation and contributors
1
+ // https://github.com/vizabi/bubblechart#readme v3.14.2 build 1654179132009 Copyright 2022 Gapminder Foundation and contributors
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('VizabiSharedComponents'), require('mobx')) :
4
4
  typeof define === 'function' && define.amd ? define(['VizabiSharedComponents', 'mobx'], factory) :
@@ -945,68 +945,69 @@
945
945
  }];
946
946
 
947
947
  config.template = `
948
- <svg class="vzb-bubblechart-svg vzb-bubblechart-svg-back vzb-export">
949
- <g class="vzb-bc-graph">
950
- <g class="vzb-bc-date"></g>
951
- <svg class="vzb-bc-axis-x"><g></g></svg>
952
- <svg class="vzb-bc-axis-y"><g></g></svg>
953
- <line class="vzb-bc-projection-x"></line>
954
- <line class="vzb-bc-projection-y"></line>
955
- </g>
948
+ <svg class="vzb-bubblechart-svg vzb-export">
949
+ <svg class="vzb-bubblechart-svg-back">
950
+ <g class="vzb-bc-graph">
951
+ <g class="vzb-bc-date"></g>
952
+ <svg class="vzb-bc-axis-x"><g></g></svg>
953
+ <svg class="vzb-bc-axis-y"><g></g></svg>
954
+ <line class="vzb-bc-projection-x"></line>
955
+ <line class="vzb-bc-projection-y"></line>
956
+ </g>
957
+ </svg>
958
+ <svg class="vzb-bubblechart-svg-main">
959
+ <g class="vzb-bc-graph">
960
+ <g class="vzb-bc-axis-x-title"><text></text></g>
961
+ <g class="vzb-bc-axis-x-info vzb-noexport"></g>
962
+
963
+ <g class="vzb-bc-axis-y-title"><text></text></g>
964
+ <g class="vzb-bc-axis-y-info vzb-noexport"></g>
965
+ <svg class="vzb-bc-bubbles-crop">
966
+ <g class="vzb-zoom-selection"></g>
967
+ <rect class="vzb-bc-eventarea"></rect>
968
+ <g class="vzb-bc-trails"></g>
969
+ <g class="vzb-bc-bubbles"></g>
970
+ <rect class="vzb-bc-forecastoverlay vzb-hidden" x="0" y="0" width="100%" height="100%" fill="url(#vzb-bc-pattern-lines-${config.id})" pointer-events='none'></rect>
971
+ </svg>
972
+
973
+ <g class="vzb-bc-axis-y-subtitle"><text></text></g>
974
+ <g class="vzb-bc-axis-x-subtitle"><text></text></g>
975
+ <g class="vzb-bc-axis-s-title"><text></text></g>
976
+ <g class="vzb-bc-axis-c-title"><text></text></g>
977
+
978
+ <rect class="vzb-bc-zoom-rect"></rect>
979
+ </g>
980
+ <g class="vzb-datawarning-button vzb-noexport"></g>
981
+ </svg>
982
+ <svg class="vzb-bubblechart-svg-front">
983
+ <g class="vzb-bc-graph">
984
+ <svg class="vzb-bc-bubbles-crop">
985
+ <g class="vzb-bc-decorations">
986
+ <line class="vzb-bc-line-equal-xy vzb-invisible"></line>
987
+ <g class="vzb-bc-x-axis-groups"></g>
988
+ </g>
989
+ <g class="vzb-bc-lines"></g>
990
+ <g class="vzb-bc-bubble-crown vzb-hidden">
991
+ <circle class="vzb-crown-glow"></circle>
992
+ <circle class="vzb-crown"></circle>
993
+ </g>
994
+ </svg>
995
+ <svg class="vzb-bc-labels-crop">
996
+ <g class="vzb-bc-labels"></g>
997
+ </svg>
998
+ </g>
999
+ </svg>
1000
+ <svg width="0" height="0">
1001
+ <defs>
1002
+ <filter class="vzb-noexport" id="vzb-glow-filter-${config.id}" x="-50%" y="-50%" width="200%" height="200%">
1003
+ <feGaussianBlur in="SourceGraphic" stdDeviation="2"></feGaussianBlur>
1004
+ </filter>
1005
+ <pattern class="vzb-noexport" id="vzb-bc-pattern-lines-${config.id}" x="0" y="0" patternUnits="userSpaceOnUse" width="50" height="50" viewBox="0 0 10 10">
1006
+ <path d='M-1,1 l2,-2M0,10 l10,-10M9,11 l2,-2' stroke='black' stroke-width='3' opacity='0.08'/>
1007
+ </pattern>
1008
+ </defs>
1009
+ </svg>
956
1010
  </svg>
957
- <svg class="vzb-bubblechart-svg vzb-bubblechart-svg-main vzb-export">
958
- <g class="vzb-bc-graph">
959
- <g class="vzb-bc-axis-x-title"><text></text></g>
960
- <g class="vzb-bc-axis-x-info vzb-noexport"></g>
961
-
962
- <g class="vzb-bc-axis-y-title"><text></text></g>
963
- <g class="vzb-bc-axis-y-info vzb-noexport"></g>
964
- <svg class="vzb-bc-bubbles-crop">
965
- <g class="vzb-zoom-selection"></g>
966
- <rect class="vzb-bc-eventarea"></rect>
967
- <g class="vzb-bc-trails"></g>
968
- <g class="vzb-bc-bubbles"></g>
969
- <rect class="vzb-bc-forecastoverlay vzb-hidden" x="0" y="0" width="100%" height="100%" fill="url(#vzb-bc-pattern-lines-${config.id})" pointer-events='none'></rect>
970
- </svg>
971
-
972
- <g class="vzb-bc-axis-y-subtitle"><text></text></g>
973
- <g class="vzb-bc-axis-x-subtitle"><text></text></g>
974
- <g class="vzb-bc-axis-s-title"><text></text></g>
975
- <g class="vzb-bc-axis-c-title"><text></text></g>
976
-
977
- <rect class="vzb-bc-zoom-rect"></rect>
978
- </g>
979
- <g class="vzb-datawarning-button vzb-noexport"></g>
980
- </svg>
981
- <svg class="vzb-bubblechart-svg vzb-bubblechart-svg-front vzb-export">
982
- <g class="vzb-bc-graph">
983
- <svg class="vzb-bc-bubbles-crop">
984
- <g class="vzb-bc-decorations">
985
- <line class="vzb-bc-line-equal-xy vzb-invisible"></line>
986
- <g class="vzb-bc-x-axis-groups"></g>
987
- </g>
988
- <g class="vzb-bc-lines"></g>
989
- <g class="vzb-bc-bubble-crown vzb-hidden">
990
- <circle class="vzb-crown-glow"></circle>
991
- <circle class="vzb-crown"></circle>
992
- </g>
993
- </svg>
994
- <svg class="vzb-bc-labels-crop">
995
- <g class="vzb-bc-labels"></g>
996
- </svg>
997
- </g>
998
- </svg>
999
- <svg width="0" height="0">
1000
- <defs>
1001
- <filter id="vzb-glow-filter-${config.id}" x="-50%" y="-50%" width="200%" height="200%">
1002
- <feGaussianBlur in="SourceGraphic" stdDeviation="2"></feGaussianBlur>
1003
- </filter>
1004
- <pattern id="vzb-bc-pattern-lines-${config.id}" x="0" y="0" patternUnits="userSpaceOnUse" width="50" height="50" viewBox="0 0 10 10">
1005
- <path d='M-1,1 l2,-2M0,10 l10,-10M9,11 l2,-2' stroke='black' stroke-width='3' opacity='0.08'/>
1006
- </pattern>
1007
- </defs>
1008
- </svg>
1009
- <!-- This could possibly be another component -->
1010
1011
  <div class="vzb-tooltip vzb-hidden vzb-tooltip-mobile"></div>
1011
1012
  `;
1012
1013
 
@@ -1026,7 +1027,8 @@
1026
1027
  zoomRect: this.element.select(".vzb-bc-zoom-rect"),
1027
1028
  eventArea: this.element.select(".vzb-bc-eventarea"),
1028
1029
  forecastOverlay: this.element.select(".vzb-bc-forecastoverlay"),
1029
- tooltipMobile: this.element.select(".vzb-tooltip-mobile")
1030
+ tooltipMobile: this.element.select(".vzb-tooltip-mobile"),
1031
+ defs: this.element.select("defs")
1030
1032
  };
1031
1033
  this.DOM.chartSvg.select(".vzb-bc-graph").call(graph =>
1032
1034
  Object.assign(this.DOM, {
@@ -1090,6 +1092,7 @@
1090
1092
  this.draggingNow = null;
1091
1093
 
1092
1094
  this.hoverBubble = false;
1095
+ this.__lastStep = 0;
1093
1096
 
1094
1097
  const _this = this;
1095
1098
  //keyboard listeners
@@ -1210,10 +1213,12 @@
1210
1213
  // this.addReaction(this._resetZoomMinMaxXReaction, this._resetZoomMinMaxX);
1211
1214
  // this.addReaction(this._resetZoomMinMaxYReaction, this._resetZoomMinMaxY);
1212
1215
  this.addReaction(this._updateOpacity);
1216
+ this.addReaction(this.updateColorPatterns);
1213
1217
  this.addReaction(this._updateShowYear);
1214
1218
  this.addReaction(this._updateYear);
1215
1219
  this.addReaction(this.drawData);
1216
1220
  this.addReaction(this._zoomToMarkerMaxMin);
1221
+ this.addReaction(this.redrawData);
1217
1222
 
1218
1223
  this.addReaction(this._selectDataPoints);
1219
1224
  this.addReaction(this._highlightDataPoints);
@@ -1230,6 +1235,41 @@
1230
1235
  //this.redrawData();
1231
1236
  }
1232
1237
 
1238
+ updateColorPatterns() {
1239
+ if (this.MDL.color.scale.isPattern) {
1240
+ const colorConcept = this.MDL.color.data.concept;
1241
+ this.DOM.defs.selectAll(".flag")
1242
+ .data(this.MDL.color.data.domainData, d => d[0])
1243
+ .enter()
1244
+ .append("pattern")
1245
+ .attr("id", d => `flag-${d[0]}-${this.id}`)
1246
+ .attr("class", "flag")
1247
+ .attr("width", "100%")
1248
+ .attr("height", "100%")
1249
+ .attr("patternContentUnits", "objectBoundingBox")
1250
+ .html(d => d[1][colorConcept])
1251
+ .each(function() {
1252
+ const svg = d3.select(this).select("svg");
1253
+ if (svg.empty()) return;
1254
+
1255
+ if (!svg.attr("viewBox"))
1256
+ svg.attr("viewBox", `0 0 ${svg.attr("width")} ${svg.attr("height")}`);
1257
+
1258
+ // xMidYMid: center the image in the circle
1259
+ // slice: scale the image to fill the circle
1260
+ if (!svg.attr("preserveAspectRatio"))
1261
+ svg.attr("preserveAspectRatio", "xMidYMid slice");
1262
+
1263
+ svg.attr("width", 1).attr("height", 1);
1264
+ });
1265
+ // .attr("xlink:href", function(d) {
1266
+ // return "flags/" + d.CountryCode + ".svg";
1267
+ // });
1268
+ } else {
1269
+ this.DOM.defs.selectAll(".flag").remove();
1270
+ }
1271
+ }
1272
+
1233
1273
  _updateShowYear() {
1234
1274
  this.DOM.date.classed("vzb-hidden", !this.ui.timeInBackground);
1235
1275
  }
@@ -1239,11 +1279,20 @@
1239
1279
  this._date.setText(this.MDL.frame.value, duration);
1240
1280
  }
1241
1281
 
1282
+ __getColor(key, valueC) {
1283
+ return valueC != null ? (this.MDL.color.scale.isPattern ? `url(#flag-${key}-${this.id})` : this.cScale(valueC)) : COLOR_WHITEISH;
1284
+ }
1285
+
1242
1286
  _createAndDeleteBubbles() {
1243
1287
  const _this = this;
1244
1288
  const duration = this._getDuration();
1245
1289
  const transition = this._getTransition(duration);
1246
1290
  const data = this.__dataProcessed;
1291
+ let trailRedrawDate;
1292
+
1293
+ mobx.runInAction(()=>{
1294
+ trailRedrawDate = this.MDL.frame.stepScale.invert(Math.min(this.__lastStep, this.__lastStep = this.MDL.frame.step << 0) - 1);
1295
+ });
1247
1296
 
1248
1297
  this.bubbles = this.DOM.bubbleContainer.selectAll(".vzb-bc-entity")
1249
1298
  .data(this.__dataProcessed, d => d[Symbol.for("key")])
@@ -1310,7 +1359,7 @@
1310
1359
  d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1311
1360
  const scaledX = _this.xScale(valueX);
1312
1361
  const scaledY = _this.yScale(valueY);
1313
- const scaledC = valueC != null ? _this.cScale(valueC) : COLOR_WHITEISH;
1362
+ const scaledC = _this.__getColor(d[Symbol.for(isTrail ? "trailHeadKey" : "key")], valueC);
1314
1363
 
1315
1364
  if (!duration || !headTrail) {
1316
1365
  circle
@@ -1340,10 +1389,10 @@
1340
1389
  .attr("x1", scaledX)
1341
1390
  .attr("y1", scaledY)
1342
1391
  .attr("x2", scaledX0)
1343
- .attr("y2", scaledY0)
1344
- .style("stroke", scaledC)
1392
+ .attr("y2", scaledY0)
1345
1393
  .attr("stroke-dasharray", Math.abs(scaledX - scaledX0) + Math.abs(scaledY - scaledY0))
1346
- .attr("stroke-dashoffset", -d.r);
1394
+ .attr("stroke-dashoffset", -d.r)
1395
+ .style("stroke", _this.MDL.color.scale.isPattern ? null : scaledC);
1347
1396
  }
1348
1397
  }
1349
1398
 
@@ -1365,13 +1414,11 @@
1365
1414
  const isTrail = isTrailBubble(d);
1366
1415
  const isExtrapolated = d[Symbol.for("extrapolated")];
1367
1416
  const dataNext = data[index + 1] || {};
1368
- const dataNext2 = data[index + 2] || {};
1369
1417
  const headTrail = isTrail && !dataNext[Symbol.for("trailHeadKey")];
1370
- const headTrail2 = isTrail && !dataNext2[Symbol.for("trailHeadKey")];
1371
1418
 
1372
1419
  const valueS = d.size;
1373
1420
  d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1374
- if (isTrail && !headTrail && !headTrail2) return;
1421
+ if (isTrail && d["frame"] < trailRedrawDate) return;
1375
1422
 
1376
1423
  const valueX = d[_this._alias("x")];
1377
1424
  const valueY = d[_this._alias("y")];
@@ -1382,21 +1429,26 @@
1382
1429
  //view.classed("vzb-hidden", d.hidden);
1383
1430
  const scaledX = _this.xScale(valueX);
1384
1431
  const scaledY = _this.yScale(valueY);
1385
- const scaledC = valueC != null ? _this.cScale(valueC) : COLOR_WHITEISH;
1432
+ const scaledC = _this.__getColor(d[Symbol.for(isTrail ? "trailHeadKey" : "key")], valueC);
1386
1433
 
1434
+ const group = d3.select(this);
1387
1435
  if (!duration || !headTrail) {
1388
- const view = duration && !isTrail ?
1389
- d3.select(this).transition(transition)
1390
- :
1391
- d3.select(this).interrupt();
1392
-
1393
- view.select("circle")
1394
- .attr("r", d.r)
1395
- .attr("fill", scaledC)
1396
- .attr("cy", scaledY)
1397
- .attr("cx", scaledX);
1436
+ const circle = group.select("circle");
1437
+ if (duration && !isTrail) {
1438
+ circle.transition(transition)
1439
+ .attr("r", d.r)
1440
+ .attr("fill", scaledC)
1441
+ .attr("cy", scaledY)
1442
+ .attr("cx", scaledX);
1443
+ } else {
1444
+ circle.interrupt()
1445
+ .attr("r", d.r)
1446
+ .attr("fill", scaledC)
1447
+ .attr("cy", scaledY)
1448
+ .attr("cx", scaledX);
1449
+ }
1398
1450
 
1399
- const diagonalLine = d3.select(this).select(".vzb-diagonal-line");
1451
+ const diagonalLine = group.select(".vzb-diagonal-line");
1400
1452
  diagonalLine
1401
1453
  .classed("vzb-hidden", !isExtrapolated);
1402
1454
  if(isExtrapolated){
@@ -1417,7 +1469,7 @@
1417
1469
 
1418
1470
  //trail line
1419
1471
  if (isTrail) {
1420
- const trailLine = d3.select(this).select(".vzb-trail-line");
1472
+ const trailLine = group.select(".vzb-trail-line");
1421
1473
  const scaledX0 = _this.xScale(dataNext[_this._alias("x")]);
1422
1474
  const scaledY0 = _this.yScale(dataNext[_this._alias("y")]);
1423
1475
 
@@ -1438,7 +1490,7 @@
1438
1490
  }
1439
1491
 
1440
1492
  trailLine
1441
- .style("stroke", scaledC)
1493
+ .style("stroke", _this.MDL.color.scale.isPattern ? null : scaledC)
1442
1494
  .attr("stroke-dasharray", Math.abs(scaledX - scaledX0) + Math.abs(scaledY - scaledY0))
1443
1495
  .attr("stroke-dashoffset", -d.r);
1444
1496
  }
@@ -1472,18 +1524,21 @@
1472
1524
 
1473
1525
 
1474
1526
  redrawData(duration) {
1475
- this.services.layout.size;
1476
- this.MDL.x.scale.type;
1477
- this.MDL.y.scale.type;
1527
+ //this.services.layout.size;
1528
+ //this.MDL.x.scale.type;
1529
+ //this.MDL.y.scale.type;
1478
1530
  this.MDL.color.scale.type;
1479
1531
  this.MDL.size.scale.type;
1480
1532
  this.MDL.size.scale.extent;
1481
1533
 
1482
1534
  const _this = this;
1483
1535
  const data = this.__dataProcessed;
1536
+ const transition = this._getTransition(duration);
1484
1537
 
1485
1538
  if (this.bubbles) this.bubbles.each(function(d, index) {
1486
1539
  const isTrail = isTrailBubble(d);
1540
+ const dataNext = data[index + 1] || {};
1541
+ const headTrail = isTrail && !dataNext[Symbol.for("trailHeadKey")];
1487
1542
  const isExtrapolated = d[Symbol.for("extrapolated")];
1488
1543
 
1489
1544
  const valueX = d[_this._alias("x")];
@@ -1494,26 +1549,37 @@
1494
1549
  d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1495
1550
  const scaledX = _this.xScale(valueX);
1496
1551
  const scaledY = _this.yScale(valueY);
1497
- const scaledC = valueC != null ? _this.cScale(valueC) : COLOR_WHITEISH;
1552
+ const scaledC = _this.__getColor(d[Symbol.for(isTrail ? "trailHeadKey" : "key")], valueC);
1498
1553
 
1499
- const view = duration ?
1500
- d3.select(this)
1501
- .transition()
1502
- .duration(duration)
1503
- : d3.select(this).interrupt();
1554
+ const group = d3.select(this);
1555
+
1556
+ if (duration && headTrail) {
1557
+ group.style("opacity", 0)
1558
+ .transition().delay(duration).duration(0)
1559
+ .style("opacity", d[Symbol.for("opacity")]);
1560
+ }
1504
1561
 
1505
- view.select("circle")
1506
- .attr("r", d.r)
1507
- .attr("fill", scaledC)
1508
- .attr("cy", scaledY)
1509
- .attr("cx", scaledX);
1562
+ const circle = group.select("circle");
1563
+ if (duration && !headTrail) {
1564
+ circle.transition(transition)
1565
+ .attr("r", d.r)
1566
+ .attr("fill", scaledC)
1567
+ .attr("cy", scaledY)
1568
+ .attr("cx", scaledX);
1569
+ } else {
1570
+ circle.interrupt()
1571
+ .attr("r", d.r)
1572
+ .attr("fill", scaledC)
1573
+ .attr("cy", scaledY)
1574
+ .attr("cx", scaledX);
1575
+ }
1510
1576
 
1511
- const diagonalLine = d3.select(this).select(".vzb-diagonal-line");
1577
+ const diagonalLine = group.select(".vzb-diagonal-line");
1512
1578
  diagonalLine
1513
1579
  .classed("vzb-hidden", !isExtrapolated);
1514
1580
  if(isExtrapolated){
1515
- if (duration){
1516
- diagonalLine.transition().duration(duration)
1581
+ if (duration && !headTrail){
1582
+ diagonalLine.transition(transition)
1517
1583
  .attr("x1", scaledX + d.r/Math.sqrt(2))
1518
1584
  .attr("y1", scaledY + d.r/Math.sqrt(2))
1519
1585
  .attr("x2", scaledX - d.r/Math.sqrt(2))
@@ -1529,11 +1595,10 @@
1529
1595
 
1530
1596
 
1531
1597
  if (isTrail) {
1532
- const trailLine = duration ?
1533
- d3.select(this).select(".vzb-trail-line")
1534
- .transition()
1535
- .duration(duration)
1536
- : d3.select(this).select(".vzb-trail-line").interrupt();
1598
+ const trailLine = (duration && !headTrail) ?
1599
+ group.select(".vzb-trail-line")
1600
+ .transition(transition)
1601
+ : group.select(".vzb-trail-line").interrupt();
1537
1602
 
1538
1603
  const dataNext = data[index + 1];
1539
1604
  const scaledX0 = _this.xScale(dataNext[_this._alias("x")]);
@@ -1544,13 +1609,13 @@
1544
1609
  .attr("y1", scaledY)
1545
1610
  .attr("x2", scaledX0)
1546
1611
  .attr("y2", scaledY0)
1547
- .style("stroke", scaledC)
1612
+ .style("stroke", _this.MDL.color.scale.isPattern ? null : scaledC)
1548
1613
  .attr("stroke-dasharray", Math.abs(scaledX - scaledX0) + Math.abs(scaledY - scaledY0))
1549
1614
  .attr("stroke-dashoffset", -d.r);
1550
1615
  }
1551
1616
  });
1552
1617
 
1553
- _this._updateLabels();
1618
+ mobx.runInAction(() => _this._updateLabels(duration));
1554
1619
  }
1555
1620
 
1556
1621
  __getZoomed(type, zoomed, domain) {
@@ -1875,10 +1940,12 @@
1875
1940
 
1876
1941
  yTitleEl.select("text").text(this.strings.title_short.Y + (compl.Y ? " · " + compl.Y : "") + " ")
1877
1942
  .append("tspan")
1943
+ .classed("vzb-noexport", true)
1878
1944
  .style("font-size", (infoElHeight * 0.7) + "px")
1879
1945
  .text("▼");
1880
1946
  xTitleEl.select("text").text(this.strings.title_short.X + (compl.X ? " · " + compl.X : "") + " ")
1881
1947
  .append("tspan")
1948
+ .classed("vzb-noexport", true)
1882
1949
  .style("font-size", (infoElHeight * 0.7) + "px")
1883
1950
  .text("▼");
1884
1951
  } else {
@@ -2263,10 +2330,12 @@
2263
2330
  if (highlightedFilter.markers.size === 1) {
2264
2331
  const highlightedKey = highlightedFilter.markers.keys().next().value;
2265
2332
  const d = Object.assign(this.model.dataMap.getByStr(highlightedKey));
2333
+ const selectedKey = d[Symbol.for("trailHeadKey")] || d[Symbol.for("key")];
2334
+
2266
2335
  const x = _this.xScale(d[_this._alias("x")]);
2267
2336
  const y = _this.yScale(d[_this._alias("y")]);
2268
2337
  const s = d.r;
2269
- const c = d.color != null ? this.cScale(d.color) : COLOR_WHITEISH;
2338
+ const c = _this.__getColor(selectedKey, d.color);
2270
2339
  let entityOutOfView = false;
2271
2340
 
2272
2341
  ////const titles = _this._formatSTitleValues(values.size[utils.getKey(d, dataKeys.size)], values.color[utils.getKey(d, dataKeys.color)]);
@@ -2276,7 +2345,6 @@
2276
2345
  }
2277
2346
 
2278
2347
  //show tooltip
2279
- const selectedKey = d[Symbol.for("trailHeadKey")] || d[Symbol.for("key")];
2280
2348
  // const trailShow = this.MDL.trail.show;
2281
2349
  // const trailStarts = this.MDL.trail.starts;
2282
2350
  // const trailGroupDim = this.MDL.trail.groupDim;
@@ -2429,7 +2497,7 @@
2429
2497
  }
2430
2498
  }
2431
2499
 
2432
- _updateLabels() {
2500
+ _updateLabels(duration) {
2433
2501
  //console.log("updateLabels");
2434
2502
 
2435
2503
  const selectedFilter = this.MDL.selected.data.filter;
@@ -2456,7 +2524,7 @@
2456
2524
  cache.valueS0 = d.size;
2457
2525
  cache.initTextBBox = null;
2458
2526
  cache.initFontSize = null;
2459
- this._labels.updateLabel({ [Symbol.for("key")]: key }, null, null, null, null, null, null, d.size_label);
2527
+ this._labels.updateLabel({ [Symbol.for("key")]: key }, null, null, null, null, null, null, d.size_label, duration);
2460
2528
  }
2461
2529
  }
2462
2530
 
@@ -2681,7 +2749,7 @@
2681
2749
  }
2682
2750
  });
2683
2751
 
2684
- BubbleChart.versionInfo = { version: "3.13.2", build: 1642697876953, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: VizabiSharedComponents.versionInfo};
2752
+ BubbleChart.versionInfo = { version: "3.14.2", build: 1654179132009, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: VizabiSharedComponents.versionInfo};
2685
2753
 
2686
2754
  return BubbleChart;
2687
2755