@vizabi/bubblechart 4.1.5 → 4.1.7

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 v4.1.5 build 1724954169997 Copyright 2024 Gapminder Foundation and contributors
1
+ // https://github.com/vizabi/bubblechart#readme v4.1.7 build 1732020146309 Copyright 2024 Gapminder Foundation and contributors
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@vizabi/shared-components'), require('d3'), require('mobx')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', '@vizabi/shared-components', 'd3', 'mobx'], factory) :
@@ -1778,6 +1778,16 @@
1778
1778
  }
1779
1779
 
1780
1780
  const diagonalLine = group.select(".vzb-diagonal-line");
1781
+ if (duration && isExtrapolated && diagonalLine.classed("vzb-hidden")) {
1782
+ const cx = +circle.attr("cx");
1783
+ const cy = +circle.attr("cy");
1784
+ const r = +circle.attr("r");
1785
+ diagonalLine
1786
+ .attr("x1", cx + r/Math.sqrt(2))
1787
+ .attr("y1", cy + r/Math.sqrt(2))
1788
+ .attr("x2", cx - r/Math.sqrt(2))
1789
+ .attr("y2", cy - r/Math.sqrt(2));
1790
+ }
1781
1791
  diagonalLine
1782
1792
  .classed("vzb-hidden", !isExtrapolated);
1783
1793
  if(isExtrapolated){
@@ -2055,8 +2065,8 @@
2055
2065
  }
2056
2066
 
2057
2067
  _updateScales() {
2058
- this.yScale = this.MDL.y.scale.d3Scale.copy();
2059
- this.xScale = this.MDL.x.scale.d3Scale.copy();
2068
+ this.yScale = this.MDL.y.scale.d3Scale;
2069
+ this.xScale = this.MDL.x.scale.d3Scale;
2060
2070
  this._labels.setScales(this.xScale, this.yScale);
2061
2071
  }
2062
2072
 
@@ -2143,7 +2153,7 @@
2143
2153
  limitMaxTickNumber: 6,
2144
2154
  bump: this.profileConstants.maxRadiusPx / 2,
2145
2155
  viewportLength: height,
2146
- formatter: this.localise
2156
+ formatter: this.services.locale.auto(y.data?.conceptProps?.format)
2147
2157
  }, rankScaleModifications));
2148
2158
 
2149
2159
  this.xAxis.scale(this.xScale)
@@ -2156,7 +2166,7 @@
2156
2166
  toolMargin: margin,
2157
2167
  bump: this.profileConstants.maxRadiusPx / 2,
2158
2168
  viewportLength: width,
2159
- formatter: this.localise
2169
+ formatter: this.services.locale.auto(x.data?.conceptProps?.format)
2160
2170
  });
2161
2171
 
2162
2172
 
@@ -2862,7 +2872,7 @@
2862
2872
  "size": {
2863
2873
  scale: {
2864
2874
  modelType: "size",
2865
- allowedTypes: ["linear", "log", "genericLog", "pow", "point"],
2875
+ allowedTypes: ["linear", "point"],
2866
2876
  range: [0, 50]
2867
2877
  }
2868
2878
  },
@@ -2876,7 +2886,7 @@
2876
2886
  },
2877
2887
  scale: {
2878
2888
  modelType: "size",
2879
- allowedTypes: ["linear", "log", "genericLog", "pow", "point"]
2889
+ allowedTypes: ["linear", "point"]
2880
2890
  }
2881
2891
  },
2882
2892
  "repeat": {
@@ -2886,7 +2896,7 @@
2886
2896
  }
2887
2897
  });
2888
2898
 
2889
- BubbleChart.versionInfo = { version: "4.1.5", build: 1724954169997, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
2899
+ BubbleChart.versionInfo = { version: "4.1.7", build: 1732020146309, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
2890
2900
 
2891
2901
  exports.Base = BubbleChart;
2892
2902