@vizabi/bubblechart 3.14.4 → 3.15.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,9 +1,9 @@
1
- // https://github.com/vizabi/bubblechart#readme v3.14.4 build 1679679202659 Copyright 2023 Gapminder Foundation and contributors
1
+ // https://github.com/vizabi/bubblechart#readme v3.15.0 build 1680629744525 Copyright 2023 Gapminder Foundation and contributors
2
2
  (function (global, factory) {
3
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('VizabiSharedComponents'), require('mobx')) :
4
- typeof define === 'function' && define.amd ? define(['VizabiSharedComponents', 'mobx'], factory) :
5
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BubbleChart = factory(global.VizabiSharedComponents, global.mobx));
6
- })(this, (function (VizabiSharedComponents, mobx) { 'use strict';
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@vizabi/shared-components'), require('d3'), require('mobx')) :
4
+ typeof define === 'function' && define.amd ? define(['@vizabi/shared-components', 'd3', 'mobx'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BubbleChart = factory(global.VizabiSharedComponents, global.d3, global.mobx));
6
+ })(this, (function (sharedComponents, d3, mobx) { 'use strict';
7
7
 
8
8
  class PanZoom {
9
9
 
@@ -149,11 +149,6 @@
149
149
 
150
150
  if ((event.type === "wheel" || event.type === "mousewheel") &&
151
151
  _this.ui.zoomOnScrolling) {
152
- // if (_this.scrollableAncestor) {
153
- // _this.scrollableAncestor.scrollTop -= (event.deltaY || -event.wheelDelta);
154
- // }
155
- // event.scale = null;
156
- //zoomer.scale(this.savedScale);
157
152
  return true;
158
153
  }
159
154
 
@@ -369,7 +364,7 @@
369
364
  }
370
365
 
371
366
  const formatter = function(n) {
372
- return VizabiSharedComponents.LegacyUtils.isDate(n) ? n : +n.toFixed(2);
367
+ return sharedComponents.LegacyUtils.isDate(n) ? n : +n.toFixed(2);
373
368
  };
374
369
 
375
370
  const zoomedXRange = xRangeBoundsBumped;
@@ -453,12 +448,12 @@
453
448
  if (!duration) duration = _this.duration;
454
449
 
455
450
  //d3 extent returns min and max of the input array as [min, max]
456
- const mmX = d3.extent(VizabiSharedComponents.LegacyUtils.values(_this.frame.x));
457
- const mmY = d3.extent(VizabiSharedComponents.LegacyUtils.values(_this.frame.y));
451
+ const mmX = d3.extent(sharedComponents.LegacyUtils.values(_this.frame.x));
452
+ const mmY = d3.extent(sharedComponents.LegacyUtils.values(_this.frame.y));
458
453
 
459
454
  //protection agains unreasonable min-max results -- abort function
460
455
  if (!mmX[0] && mmX[0] !== 0 || !mmX[1] && mmX[1] !== 0 || !mmY[0] && mmY[0] !== 0 || !mmY[1] && mmY[1] !== 0) {
461
- return VizabiSharedComponents.LegacyUtils.warn("panZoom.expandCanvas: X or Y min/max are broken. Aborting with no action");
456
+ return sharedComponents.LegacyUtils.warn("panZoom.expandCanvas: X or Y min/max are broken. Aborting with no action");
462
457
  }
463
458
  /*
464
459
  * Use a range bumped scale to correctly accommodate the range bump
@@ -588,7 +583,7 @@
588
583
  let zoom, ratioX, ratioY;
589
584
 
590
585
  if (x1 == x2 || y1 == y2 || xRangeBoundsBumped[0] == xRangeBoundsBumped[1] || yRangeBoundsBumped[0] == yRangeBoundsBumped[1]) {
591
- return VizabiSharedComponents.LegacyUtils.warn("_zoomOnRectangle(): can not proceed because this may result in infinity zooms");
586
+ return sharedComponents.LegacyUtils.warn("_zoomOnRectangle(): can not proceed because this may result in infinity zooms");
592
587
  }
593
588
 
594
589
  if (Math.abs(x1 - x2) > Math.abs(y1 - y2)) {
@@ -724,7 +719,7 @@
724
719
 
725
720
  this.DOM.xAxisGroupsEl.classed("vzb-invisible", !showxAxisGroups);
726
721
  if (showxAxisGroups) {
727
- const axisGroupsData = VizabiSharedComponents.Utils.injectIndexes(uiSetting.xAxisGroups[this.MDL.x.data.concept]);
722
+ const axisGroupsData = sharedComponents.Utils.injectIndexes(uiSetting.xAxisGroups[this.MDL.x.data.concept]);
728
723
  let xAxisGroups = this.DOM.xAxisGroupsEl.selectAll(".vzb-bc-x-axis-group").data(axisGroupsData);
729
724
 
730
725
  xAxisGroups.exit().remove();
@@ -863,7 +858,7 @@
863
858
  }
864
859
  }
865
860
 
866
- const {ICON_QUESTION} = VizabiSharedComponents.Icons;
861
+ const {ICON_QUESTION} = sharedComponents.Icons;
867
862
  const COLOR_WHITEISH = "rgb(253, 253, 253)";
868
863
 
869
864
  const marginScaleH = (marginMin, ratio = 0) => height => marginMin + height * ratio;
@@ -881,7 +876,7 @@
881
876
  leftMarginRatio: 1,
882
877
  padding: 2,
883
878
  minRadiusPx: 0.5,
884
- maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * VizabiSharedComponents.LegacyUtils.hypotenuse(width, height)),
879
+ maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * sharedComponents.LegacyUtils.hypotenuse(width, height)),
885
880
  infoElHeight: 16,
886
881
  yAxisTitleBottomMargin: 6,
887
882
  xAxisTitleBottomMargin: 4
@@ -891,7 +886,7 @@
891
886
  leftMarginRatio: 1.6,
892
887
  padding: 2,
893
888
  minRadiusPx: 1,
894
- maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * VizabiSharedComponents.LegacyUtils.hypotenuse(width, height)),
889
+ maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * sharedComponents.LegacyUtils.hypotenuse(width, height)),
895
890
  infoElHeight: 20,
896
891
  yAxisTitleBottomMargin: 3,
897
892
  xAxisTitleBottomMargin: 4
@@ -901,7 +896,7 @@
901
896
  leftMarginRatio: 1.8,
902
897
  padding: 2,
903
898
  minRadiusPx: 1,
904
- maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * VizabiSharedComponents.LegacyUtils.hypotenuse(width, height)),
899
+ maxRadiusPx: Math.max(0.5, MAX_RADIUS_EM * sharedComponents.LegacyUtils.hypotenuse(width, height)),
905
900
  infoElHeight: 22,
906
901
  yAxisTitleBottomMargin: 3,//marginScaleH(4, 0.01)(height),
907
902
  xAxisTitleBottomMargin: marginScaleH(0, 0.01)(height),
@@ -926,11 +921,11 @@
926
921
  });
927
922
 
928
923
  // BUBBLE CHART COMPONENT
929
- class _VizabiBubbleChart extends VizabiSharedComponents.Chart {
924
+ class _VizabiBubbleChart extends sharedComponents.Chart {
930
925
 
931
926
  constructor(config) {
932
927
  config.subcomponents = [{
933
- type: VizabiSharedComponents.Labels,
928
+ type: sharedComponents.Labels,
934
929
  placeholder: ".vzb-bc-labels",
935
930
  options: {
936
931
  CSS_PREFIX: "vzb-bc",
@@ -940,7 +935,7 @@
940
935
  },
941
936
  name: "labels"
942
937
  },{
943
- type: VizabiSharedComponents.DateTimeBackground,
938
+ type: sharedComponents.DateTimeBackground,
944
939
  placeholder: ".vzb-bc-date"
945
940
  }];
946
941
 
@@ -1073,7 +1068,7 @@
1073
1068
 
1074
1069
  //set filter
1075
1070
  this.DOM.bubbleCrown.selectAll(".vzb-crown-glow")
1076
- .attr("filter", `url(${location.pathname}#vzb-glow-filter-${this.id})`);
1071
+ .attr("filter", `url(#vzb-glow-filter-${this.id})`);
1077
1072
 
1078
1073
  this._date = this.findChild({type: "DateTimeBackground"});
1079
1074
  this._labels = this.findChild({type: "Labels"});
@@ -1081,10 +1076,8 @@
1081
1076
  this.decorations = new BCDecorations(this);
1082
1077
  this._initInfoElements();
1083
1078
 
1084
- this.scrollableAncestor = VizabiSharedComponents.LegacyUtils.findScrollableAncestor(this.element);
1085
-
1086
- this.xAxis = VizabiSharedComponents.axisSmart("bottom");
1087
- this.yAxis = VizabiSharedComponents.axisSmart("left");
1079
+ this.xAxis = sharedComponents.axisSmart("bottom");
1080
+ this.yAxis = sharedComponents.axisSmart("left");
1088
1081
 
1089
1082
  this.axisTitleComplimentStrings = {Y: "", X: "", S: "", C: ""};
1090
1083
 
@@ -1138,14 +1131,14 @@
1138
1131
  const dataNotesDialog = () => this.root.findChild({type: "DataNotes"});
1139
1132
  const timeSlider = () => this.root.findChild({type: "TimeSlider"});
1140
1133
 
1141
- VizabiSharedComponents.LegacyUtils.setIcon(this.DOM.yInfoEl, ICON_QUESTION)
1134
+ sharedComponents.LegacyUtils.setIcon(this.DOM.yInfoEl, ICON_QUESTION)
1142
1135
  .on("click", () => {
1143
1136
  dataNotesDialog().pin();
1144
1137
  })
1145
1138
  .on("mouseover", function() {
1146
1139
  if (timeSlider().ui.dragging) return;
1147
1140
  const rect = this.getBBox();
1148
- const coord = VizabiSharedComponents.LegacyUtils.makeAbsoluteContext(this, this.farthestViewportElement)(rect.x - 10, rect.y + rect.height + 10);
1141
+ const coord = sharedComponents.LegacyUtils.makeAbsoluteContext(this, this.farthestViewportElement)(rect.x - 10, rect.y + rect.height + 10);
1149
1142
  const toolRect = _this.root.element.node().getBoundingClientRect();
1150
1143
  const chartRect = _this.element.node().getBoundingClientRect();
1151
1144
  dataNotesDialog()
@@ -1158,14 +1151,14 @@
1158
1151
  dataNotesDialog().hide();
1159
1152
  });
1160
1153
 
1161
- VizabiSharedComponents.LegacyUtils.setIcon(this.DOM.xInfoEl, ICON_QUESTION)
1154
+ sharedComponents.LegacyUtils.setIcon(this.DOM.xInfoEl, ICON_QUESTION)
1162
1155
  .on("click", () => {
1163
1156
  dataNotesDialog().pin();
1164
1157
  })
1165
1158
  .on("mouseover", function() {
1166
1159
  if (timeSlider().ui.dragging) return;
1167
1160
  const rect = this.getBBox();
1168
- const coord = VizabiSharedComponents.LegacyUtils.makeAbsoluteContext(this, this.farthestViewportElement)(rect.x - 10, rect.y + rect.height + 10);
1161
+ const coord = sharedComponents.LegacyUtils.makeAbsoluteContext(this, this.farthestViewportElement)(rect.x - 10, rect.y + rect.height + 10);
1169
1162
  const toolRect = _this.root.element.node().getBoundingClientRect();
1170
1163
  const chartRect = _this.element.node().getBoundingClientRect();
1171
1164
  dataNotesDialog()
@@ -1262,9 +1255,6 @@
1262
1255
 
1263
1256
  svg.attr("width", 1).attr("height", 1);
1264
1257
  });
1265
- // .attr("xlink:href", function(d) {
1266
- // return "flags/" + d.CountryCode + ".svg";
1267
- // });
1268
1258
  } else {
1269
1259
  this.DOM.defs.selectAll(".flag").remove();
1270
1260
  }
@@ -1314,7 +1304,7 @@
1314
1304
  .attr("id", d => `vzb-bc-bubble-${d[Symbol.for("key")]}-${this.id}`)
1315
1305
  .style("opacity", d => d[Symbol.for("opacity")] = this._getBubbleOpacity(d))
1316
1306
  .call(selection => {
1317
- if(!VizabiSharedComponents.LegacyUtils.isTouchDevice()){
1307
+ if(!sharedComponents.LegacyUtils.isTouchDevice()){
1318
1308
  selection
1319
1309
  .on("mouseover", (event, d) => {
1320
1310
  if (this.ui.cursorMode !== "arrow" && this.ui.cursorMode !== "hand") return;
@@ -1356,7 +1346,7 @@
1356
1346
  //d.hidden = (!valueS && valueS !== 0) || valueX == null || valueY == null;
1357
1347
 
1358
1348
  //view.classed("vzb-hidden", d.hidden);
1359
- d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1349
+ d.r = sharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1360
1350
  const scaledX = _this.xScale(valueX);
1361
1351
  const scaledY = _this.yScale(valueY);
1362
1352
  const scaledC = _this.__getColor(d[Symbol.for(isTrail ? "trailHeadKey" : "key")], valueC);
@@ -1417,7 +1407,7 @@
1417
1407
  const headTrail = isTrail && !dataNext[Symbol.for("trailHeadKey")];
1418
1408
 
1419
1409
  const valueS = d.size;
1420
- d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1410
+ d.r = sharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1421
1411
  if (isTrail && d["frame"] < trailRedrawDate) return;
1422
1412
 
1423
1413
  const valueX = d[_this._alias("x")];
@@ -1546,7 +1536,7 @@
1546
1536
  const valueS = d.size;
1547
1537
  const valueC = d.color;
1548
1538
 
1549
- d.r = VizabiSharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1539
+ d.r = sharedComponents.LegacyUtils.areaToRadius(_this.sScale(valueS || 0));
1550
1540
  const scaledX = _this.xScale(valueX);
1551
1541
  const scaledY = _this.yScale(valueY);
1552
1542
  const scaledC = _this.__getColor(d[Symbol.for(isTrail ? "trailHeadKey" : "key")], valueC);
@@ -1710,7 +1700,7 @@
1710
1700
  PROFILE_CONSTANTS_FOR_PROJECTOR(this.elementWidth, this.elementHeight)
1711
1701
  );
1712
1702
 
1713
- if (!this.elementHeight || !this.elementWidth) return VizabiSharedComponents.LegacyUtils.warn("Chart _updateProfile() abort: container is too little or has display:none");
1703
+ if (!this.elementHeight || !this.elementWidth) return sharedComponents.LegacyUtils.warn("Chart _updateProfile() abort: container is too little or has display:none");
1714
1704
  }
1715
1705
 
1716
1706
  _getDuration() {
@@ -1734,34 +1724,34 @@
1734
1724
 
1735
1725
  this.strings = {
1736
1726
  title: {
1737
- Y: VizabiSharedComponents.Utils.getConceptName(y, this.localise),
1738
- X: VizabiSharedComponents.Utils.getConceptName(x, this.localise),
1739
- S: VizabiSharedComponents.Utils.getConceptName(size, this.localise),
1740
- C: VizabiSharedComponents.Utils.getConceptName(color, this.localise)
1727
+ Y: sharedComponents.Utils.getConceptName(y, this.localise),
1728
+ X: sharedComponents.Utils.getConceptName(x, this.localise),
1729
+ S: sharedComponents.Utils.getConceptName(size, this.localise),
1730
+ C: sharedComponents.Utils.getConceptName(color, this.localise)
1741
1731
  },
1742
1732
  title_short: {
1743
- Y: VizabiSharedComponents.Utils.getConceptShortName(y, this.localise),
1744
- X: VizabiSharedComponents.Utils.getConceptShortName(x, this.localise),
1745
- S: VizabiSharedComponents.Utils.getConceptShortName(size, this.localise),
1746
- C: VizabiSharedComponents.Utils.getConceptShortName(color, this.localise)
1733
+ Y: sharedComponents.Utils.getConceptShortName(y, this.localise),
1734
+ X: sharedComponents.Utils.getConceptShortName(x, this.localise),
1735
+ S: sharedComponents.Utils.getConceptShortName(size, this.localise),
1736
+ C: sharedComponents.Utils.getConceptShortName(color, this.localise)
1747
1737
  },
1748
1738
  subtitle: {
1749
- Y: VizabiSharedComponents.Utils.getConceptNameMinusShortName(y, this.localise),
1750
- X: VizabiSharedComponents.Utils.getConceptNameMinusShortName(x, this.localise)
1739
+ Y: sharedComponents.Utils.getConceptNameMinusShortName(y, this.localise),
1740
+ X: sharedComponents.Utils.getConceptNameMinusShortName(x, this.localise)
1751
1741
  },
1752
1742
  unit: {
1753
- Y: VizabiSharedComponents.Utils.getConceptUnit(y),
1754
- X: VizabiSharedComponents.Utils.getConceptUnit(x),
1755
- S: VizabiSharedComponents.Utils.getConceptUnit(size),
1756
- C: VizabiSharedComponents.Utils.getConceptUnit(color)
1743
+ Y: sharedComponents.Utils.getConceptUnit(y),
1744
+ X: sharedComponents.Utils.getConceptUnit(x),
1745
+ S: sharedComponents.Utils.getConceptUnit(size),
1746
+ C: sharedComponents.Utils.getConceptUnit(color)
1757
1747
  }
1758
1748
  };
1759
1749
 
1760
1750
  Promise.all([
1761
- VizabiSharedComponents.Utils.getConceptNameCompliment(y),
1762
- VizabiSharedComponents.Utils.getConceptNameCompliment(x),
1763
- VizabiSharedComponents.Utils.getConceptNameCompliment(size),
1764
- VizabiSharedComponents.Utils.getConceptNameCompliment(color)
1751
+ sharedComponents.Utils.getConceptNameCompliment(y),
1752
+ sharedComponents.Utils.getConceptNameCompliment(x),
1753
+ sharedComponents.Utils.getConceptNameCompliment(size),
1754
+ sharedComponents.Utils.getConceptNameCompliment(color)
1765
1755
  ]).then(mobx.action(response => {
1766
1756
  [
1767
1757
  this.axisTitleComplimentStrings.Y,
@@ -1776,7 +1766,7 @@
1776
1766
  const treemenu = this.root.findChild({type: "TreeMenu"});
1777
1767
 
1778
1768
  this.DOM.yTitleEl
1779
- .classed("vzb-disabled", treemenu.state.ownReadiness !== VizabiSharedComponents.Utils.STATUS.READY)
1769
+ .classed("vzb-disabled", treemenu.state.ownReadiness !== sharedComponents.Utils.STATUS.READY)
1780
1770
  .on("click", () => {
1781
1771
  treemenu
1782
1772
  .encoding(this._alias("y"))
@@ -1787,7 +1777,7 @@
1787
1777
  });
1788
1778
 
1789
1779
  this.DOM.xTitleEl
1790
- .classed("vzb-disabled", treemenu.state.ownReadiness !== VizabiSharedComponents.Utils.STATUS.READY)
1780
+ .classed("vzb-disabled", treemenu.state.ownReadiness !== sharedComponents.Utils.STATUS.READY)
1791
1781
  .on("click", () => {
1792
1782
  treemenu
1793
1783
  .encoding(this._alias("x"))
@@ -2022,7 +2012,7 @@
2022
2012
 
2023
2013
  if (yInfoEl.select("svg").node()) {
2024
2014
  const titleBBox = yTitleEl.node().getBBox();
2025
- const t = VizabiSharedComponents.LegacyUtils.transform(yTitleEl.node());
2015
+ const t = sharedComponents.LegacyUtils.transform(yTitleEl.node());
2026
2016
  const hTranslate = isRTL ? (titleBBox.x + t.translateX - infoElHeight * 1.4) : (titleBBox.x + t.translateX + titleBBox.width + infoElHeight * 0.4);
2027
2017
  const vTranslate = isRTL ? (t.translateY + infoElHeight * 1.4 + titleBBox.width * 0.5) : (t.translateY - infoElHeight * 0.4 - titleBBox.width * 0.5);
2028
2018
  const conceptPropsY = y.data.conceptProps;
@@ -2039,7 +2029,7 @@
2039
2029
 
2040
2030
  if (xInfoEl.select("svg").node()) {
2041
2031
  const titleBBox = xTitleEl.node().getBBox();
2042
- const t = VizabiSharedComponents.LegacyUtils.transform(xTitleEl.node());
2032
+ const t = sharedComponents.LegacyUtils.transform(xTitleEl.node());
2043
2033
  const hTranslate = isRTL ? (titleBBox.x + t.translateX - infoElHeight * 1.4) : (titleBBox.x + t.translateX + titleBBox.width + infoElHeight * 0.4);
2044
2034
  const conceptPropsX = x.data.conceptProps;
2045
2035
 
@@ -2055,7 +2045,7 @@
2055
2045
  _rangeBump(arg, undo) {
2056
2046
  const bump = this.profileConstants.maxRadiusPx;
2057
2047
  undo = undo ? -1 : 1;
2058
- if (VizabiSharedComponents.LegacyUtils.isArray(arg) && arg.length > 1) {
2048
+ if (sharedComponents.LegacyUtils.isArray(arg) && arg.length > 1) {
2059
2049
  let z1 = arg[0];
2060
2050
  let z2 = arg[arg.length - 1];
2061
2051
 
@@ -2073,7 +2063,7 @@
2073
2063
  } else ;
2074
2064
  return [z1, z2];
2075
2065
  }
2076
- VizabiSharedComponents.LegacyUtils.warn("rangeBump error: input is not an array or empty");
2066
+ sharedComponents.LegacyUtils.warn("rangeBump error: input is not an array or empty");
2077
2067
  }
2078
2068
 
2079
2069
  _updateSTitle(titleS, titleC) {
@@ -2166,8 +2156,8 @@
2166
2156
 
2167
2157
  const extent = this.MDL.size.scale.extent || [0, 1];
2168
2158
 
2169
- let minArea = VizabiSharedComponents.LegacyUtils.radiusToArea(Math.max(maxRadiusPx * extent[0], minRadiusPx));
2170
- let maxArea = VizabiSharedComponents.LegacyUtils.radiusToArea(Math.max(maxRadiusPx * extent[1], minRadiusPx));
2159
+ let minArea = sharedComponents.LegacyUtils.radiusToArea(Math.max(maxRadiusPx * extent[0], minRadiusPx));
2160
+ let maxArea = sharedComponents.LegacyUtils.radiusToArea(Math.max(maxRadiusPx * extent[1], minRadiusPx));
2171
2161
 
2172
2162
  let range = minArea === maxArea? [minArea, maxArea] :
2173
2163
  d3.range(minArea, maxArea, (maxArea - minArea)/(this.sScale.domain().length - 1)).concat(maxArea);
@@ -2408,7 +2398,7 @@
2408
2398
  const _this = this;
2409
2399
  const selectedFilter = this.MDL.selected.data.filter;
2410
2400
 
2411
- if (VizabiSharedComponents.LegacyUtils.isTouchDevice()) {
2401
+ if (sharedComponents.LegacyUtils.isTouchDevice()) {
2412
2402
  _this.MDL.highlighted.data.filter.clear();
2413
2403
  _this._labels.showCloseCross(null, false);
2414
2404
  } else {
@@ -2479,7 +2469,7 @@
2479
2469
  cache.labelX0 = trailData[this._alias("x")];
2480
2470
  cache.labelY0 = trailData[this._alias("y")];
2481
2471
  cache.scaledC0 = trailData.color != null ? this.cScale(trailData.color) : COLOR_WHITEISH,
2482
- cache.scaledS0 = (trailData.size || trailData.size === 0) ? VizabiSharedComponents.LegacyUtils.areaToRadius(this.sScale(trailData.size)) : null;
2472
+ cache.scaledS0 = (trailData.size || trailData.size === 0) ? sharedComponents.LegacyUtils.areaToRadius(this.sScale(trailData.size)) : null;
2483
2473
  cache.valueS0 = trailData.size;
2484
2474
  trailData.hidden = hidden;
2485
2475
  this._labels.updateLabel(trailData, cache, cache.labelX0, cache.labelY0, trailData.size, trailData.color, labelText, trailData.size_label, duration, showhide);
@@ -2489,7 +2479,7 @@
2489
2479
  cache.labelX0 = x;
2490
2480
  cache.labelY0 = y;
2491
2481
  cache.scaledC0 = d.color != null ? this.cScale(d.color) : COLOR_WHITEISH,
2492
- cache.scaledS0 = (d.size || d.size === 0) ? VizabiSharedComponents.LegacyUtils.areaToRadius(this.sScale(d.size)) : null;
2482
+ cache.scaledS0 = (d.size || d.size === 0) ? sharedComponents.LegacyUtils.areaToRadius(this.sScale(d.size)) : null;
2493
2483
  cache.valueS0 = d.size;
2494
2484
  d.hidden = hidden;
2495
2485
  this._labels.updateLabel(d, cache, x, y, d.size, d.color, labelText, d.size_label, duration, showhide);
@@ -2520,7 +2510,7 @@
2520
2510
  cache.labelX0 = d[this._alias("x")];
2521
2511
  cache.labelY0 = d[this._alias("y")];
2522
2512
  cache.scaledC0 = d.color != null ? this.cScale(d.color) : COLOR_WHITEISH,
2523
- cache.scaledS0 = (d.size || d.size === 0) ? VizabiSharedComponents.LegacyUtils.areaToRadius(this.sScale(d.size)) : null;
2513
+ cache.scaledS0 = (d.size || d.size === 0) ? sharedComponents.LegacyUtils.areaToRadius(this.sScale(d.size)) : null;
2524
2514
  cache.valueS0 = d.size;
2525
2515
  cache.initTextBBox = null;
2526
2516
  cache.initFontSize = null;
@@ -2532,7 +2522,7 @@
2532
2522
  if (typeof d.label == "object")
2533
2523
  return Object.entries(d.label)
2534
2524
  .filter(entry => entry[0] != this.MDL.frame.data.concept)
2535
- .map(entry => VizabiSharedComponents.LegacyUtils.isNumber(entry[1]) ? (entry[0] + ": " + entry[1]) : entry[1])
2525
+ .map(entry => sharedComponents.LegacyUtils.isNumber(entry[1]) ? (entry[0] + ": " + entry[1]) : entry[1])
2536
2526
  .join(", ");
2537
2527
  if (d.label != null) return "" + d.label;
2538
2528
  return d[Symbol.for("key")];
@@ -2595,9 +2585,9 @@
2595
2585
  "cScale": mobx.computed
2596
2586
  });
2597
2587
 
2598
- VizabiSharedComponents.Chart.add("bubblechart", VizabiBubbleChart);
2588
+ sharedComponents.Chart.add("bubblechart", VizabiBubbleChart);
2599
2589
 
2600
- class BubbleChart extends VizabiSharedComponents.BaseComponent {
2590
+ class BubbleChart extends sharedComponents.BaseComponent {
2601
2591
 
2602
2592
  constructor(config){
2603
2593
 
@@ -2613,7 +2603,7 @@
2613
2603
  config.name = "bubblechart";
2614
2604
 
2615
2605
  config.subcomponents = [{
2616
- type: VizabiSharedComponents.Repeater,
2606
+ type: sharedComponents.Repeater,
2617
2607
  placeholder: ".vzb-repeater",
2618
2608
  model: marker,
2619
2609
  options: {
@@ -2622,48 +2612,48 @@
2622
2612
  },
2623
2613
  name: "chart",
2624
2614
  },{
2625
- type: VizabiSharedComponents.TimeSlider,
2615
+ type: sharedComponents.TimeSlider,
2626
2616
  placeholder: ".vzb-timeslider",
2627
2617
  model: marker,
2628
2618
  name: "time-slider"
2629
2619
  },{
2630
- type: VizabiSharedComponents.SteppedSlider,
2620
+ type: sharedComponents.SteppedSlider,
2631
2621
  placeholder: ".vzb-speedslider",
2632
2622
  model: marker,
2633
2623
  name: "speed-slider"
2634
2624
  },{
2635
- type: VizabiSharedComponents.TreeMenu,
2625
+ type: sharedComponents.TreeMenu,
2636
2626
  placeholder: ".vzb-treemenu",
2637
2627
  model: marker,
2638
2628
  name: "tree-menu"
2639
2629
  },{
2640
- type: VizabiSharedComponents.DataWarning,
2630
+ type: sharedComponents.DataWarning,
2641
2631
  placeholder: ".vzb-datawarning",
2642
2632
  options: {button: ".vzb-datawarning-button"},
2643
2633
  model: marker,
2644
2634
  name: "data-warning"
2645
2635
  },{
2646
- type: VizabiSharedComponents.DataNotes,
2636
+ type: sharedComponents.DataNotes,
2647
2637
  placeholder: ".vzb-datanotes",
2648
2638
  model: marker
2649
2639
  },{
2650
- type: VizabiSharedComponents.Dialogs,
2640
+ type: sharedComponents.Dialogs,
2651
2641
  placeholder: ".vzb-dialogs",
2652
2642
  model: marker,
2653
2643
  name: "dialogs"
2654
2644
  },{
2655
- type: VizabiSharedComponents.ButtonList,
2645
+ type: sharedComponents.ButtonList,
2656
2646
  placeholder: ".vzb-buttonlist",
2657
2647
  model: marker,
2658
2648
  name: "buttons"
2659
2649
  },{
2660
- type: VizabiSharedComponents.SpaceConfig,
2650
+ type: sharedComponents.SpaceConfig,
2661
2651
  placeholder: ".vzb-spaceconfig",
2662
2652
  options: {button: ".vzb-spaceconfig-button"},
2663
2653
  model: marker,
2664
2654
  name: "space-config"
2665
2655
  },{
2666
- type: VizabiSharedComponents.ErrorMessage,
2656
+ type: sharedComponents.ErrorMessage,
2667
2657
  placeholder: ".vzb-errormessage",
2668
2658
  model: marker,
2669
2659
  name: "error-message"
@@ -2686,10 +2676,12 @@
2686
2676
  <div class="vzb-errormessage"></div>
2687
2677
  `;
2688
2678
 
2679
+ config.locale.Vizabi = config.Vizabi;
2680
+ config.layout.Vizabi = config.Vizabi;
2689
2681
  config.services = {
2690
- Vizabi: new VizabiSharedComponents.CapitalVizabiService({Vizabi: config.Vizabi}),
2691
- locale: new VizabiSharedComponents.LocaleService(config.locale),
2692
- layout: new VizabiSharedComponents.LayoutService(config.layout)
2682
+ Vizabi: new sharedComponents.CapitalVizabiService({Vizabi: config.Vizabi}),
2683
+ locale: new sharedComponents.LocaleService(config.locale),
2684
+ layout: new sharedComponents.LayoutService(config.layout)
2693
2685
  };
2694
2686
 
2695
2687
  super(config);
@@ -2751,7 +2743,7 @@
2751
2743
  }
2752
2744
  });
2753
2745
 
2754
- BubbleChart.versionInfo = { version: "3.14.4", build: 1679679202659, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: VizabiSharedComponents.versionInfo};
2746
+ BubbleChart.versionInfo = { version: "3.15.0", build: 1680629744525, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
2755
2747
 
2756
2748
  return BubbleChart;
2757
2749