@vizabi/bubblechart 4.2.0 → 4.4.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.
@@ -300,14 +300,6 @@
300
300
  visibility: hidden;
301
301
  pointer-events: none;
302
302
  }
303
- .vzb-tool .vzb-bubblechart.vzb-sm-chart .vzb-datawarning-button {
304
- visibility: hidden;
305
- pointer-events: none;
306
- }
307
- .vzb-tool .vzb-bubblechart.vzb-sm-last-chart .vzb-datawarning-button {
308
- visibility: visible;
309
- pointer-events: all;
310
- }
311
303
  .vzb-tool .vzb-bubblechart .vzb-bubblechart-svg-front {
312
304
  pointer-events: none;
313
305
  }
@@ -1,4 +1,4 @@
1
- // https://github.com/vizabi/bubblechart#readme v4.2.0 build 1738001668539 Copyright 2025 Gapminder Foundation and contributors
1
+ // https://github.com/vizabi/bubblechart#readme v4.4.0 build 1743007605486 Copyright 2025 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) :
@@ -1256,7 +1256,7 @@
1256
1256
 
1257
1257
  const PROFILE_CONSTANTS = (width, height) => ({
1258
1258
  SMALL: {
1259
- margin: { top: 30, bottom: 35, left: 30, right: 10},
1259
+ margin: { top: 30, bottom: 40, left: 30, right: 10},
1260
1260
  leftMarginRatio: 1,
1261
1261
  padding: 2,
1262
1262
  minRadiusPx: 0.5,
@@ -1268,7 +1268,7 @@
1268
1268
  xAxisTitleBottomMargin: 4
1269
1269
  },
1270
1270
  MEDIUM: {
1271
- margin: { top: 15, bottom: 40, left: 40, right: 15},
1271
+ margin: { top: 15, bottom: 45, left: 40, right: 15},
1272
1272
  leftMarginRatio: 1.6,
1273
1273
  padding: 2,
1274
1274
  minRadiusPx: 1,
@@ -1357,7 +1357,6 @@
1357
1357
 
1358
1358
  <rect class="vzb-bc-zoom-rect"></rect>
1359
1359
  </g>
1360
- <g class="vzb-datawarning-button vzb-noexport"></g>
1361
1360
  </svg>
1362
1361
  <svg class="vzb-bubblechart-svg-front">
1363
1362
  <g class="vzb-bc-graph">
@@ -2104,11 +2103,11 @@
2104
2103
 
2105
2104
  const _this = this;
2106
2105
 
2107
- const layoutProfile = this.services.layout.profile;
2106
+ this.services.layout.profile;
2108
2107
 
2109
2108
  const margin = this.profileConstants.margin;
2110
2109
  const infoElHeight = this.profileConstants.infoElHeight;
2111
- const xAxisTitleBottomMargin = this.profileConstants.xAxisTitleBottomMargin;
2110
+ this.profileConstants.xAxisTitleBottomMargin;
2112
2111
 
2113
2112
  //stage
2114
2113
  const height = this.height = (this.elementHeight - margin.top - margin.bottom) || 0;
@@ -2205,17 +2204,8 @@
2205
2204
  xAxisGroupsEl
2206
2205
  .style("font-size", infoElHeight * 0.8 + "px");
2207
2206
 
2208
- this.root.findChild({type: "_DataWarning"}).setOptions({
2209
- width: this.elementWidth,
2210
- height: this.elementHeight,
2211
- vertical: "bottom",
2212
- horizontal: "right",
2213
- right: margin.right,
2214
- bottom: xAxisTitleBottomMargin,
2215
- wLimit: (layoutProfile !== "SMALL" ? 0.5 : 1) *
2216
- (this.elementWidth - this.DOM.graph.select(".vzb-bc-axis-x-title").node().getBBox().width - infoElHeight * 3)
2217
- });
2218
-
2207
+ canvasWrap.style("max-width", width + "px");
2208
+ canvasWrap.style("max-height", Math.max(0, height) + "px");
2219
2209
  }
2220
2210
 
2221
2211
 
@@ -2686,42 +2676,6 @@
2686
2676
  }
2687
2677
 
2688
2678
  _VizabiBubbleChart.DEFAULT_UI = {
2689
- show_ticks: true,
2690
- showForecast: false,
2691
- showForecastOverlay: true,
2692
- pauseBeforeForecast: true,
2693
- opacityHighlight: 1.0,
2694
- opacitySelect: 1.0,
2695
- opacityHighlightDim: 0.1,
2696
- opacitySelectDim: 0.3,
2697
- opacityRegular: 0.5,
2698
- timeInBackground: true,
2699
- timeInTrails: true,
2700
- lockNonSelected: 0,
2701
- panWithArrow: false,
2702
- adaptMinMaxZoom: false,
2703
- cursorMode: "arrow",
2704
- zoomOnScrolling: true,
2705
- decorations: {
2706
- enabled: true,
2707
- xAxisGroups: null //left to be set by external page
2708
- },
2709
- superhighlightOnMinimapHover: true,
2710
- whenHovering: {
2711
- showProjectionLineX: true,
2712
- showProjectionLineY: true,
2713
- higlightValueX: true,
2714
- higlightValueY: true
2715
- },
2716
- labels: {
2717
- enabled: true,
2718
- dragging: true,
2719
- removeLabelBox: false
2720
- },
2721
- margin: {
2722
- left: 0,
2723
- top: 0
2724
- }
2725
2679
  };
2726
2680
 
2727
2681
  //export default BubbleChart;
@@ -2774,7 +2728,7 @@
2774
2728
  },{
2775
2729
  type: sharedComponents.DataWarning,
2776
2730
  placeholder: ".vzb-datawarning",
2777
- options: {button: ".vzb-datawarning-button"},
2731
+ options: {appendButtonHere: ".vzb-repeater"},
2778
2732
  model: marker,
2779
2733
  name: "data-warning"
2780
2734
  },{
@@ -2836,7 +2790,62 @@
2836
2790
  }
2837
2791
 
2838
2792
  BubbleChart.DEFAULT_UI = {
2793
+ //ui
2794
+ "buttons": {
2795
+ "buttons": ["colors", "markercontrols", "trails", "moreoptions", "presentation", "sidebarcollapse", "fullscreen"]
2796
+ },
2797
+ "dialogs": {
2798
+ "dialogs": {
2799
+ "popup": ["colors", "markercontrols", "moreoptions"],
2800
+ "sidebar": ["colors", "markercontrols", "size", "zoom"],
2801
+ "moreoptions": ["opacity", "speed", "axes", "size", "colors", "label", "zoom", "technical", "repeat", "presentation", "about"]
2802
+ },
2803
+ "markercontrols": {}
2804
+ },
2839
2805
  chart: {
2806
+ show_ticks: true,
2807
+ showForecast: false,
2808
+ showForecastOverlay: true,
2809
+ pauseBeforeForecast: true,
2810
+ opacityHighlight: 1.0,
2811
+ opacitySelect: 1.0,
2812
+ opacityHighlightDim: 0.1,
2813
+ opacitySelectDim: 0.3,
2814
+ opacityRegular: 0.8,
2815
+ timeInBackground: true,
2816
+ timeInTrails: true,
2817
+ lockNonSelected: 0,
2818
+ panWithArrow: false,
2819
+ adaptMinMaxZoom: false,
2820
+ cursorMode: "arrow",
2821
+ zoomOnScrolling: true,
2822
+ decorations: {
2823
+ enabled: true,
2824
+ xAxisGroups: null //left to be set by external page
2825
+ },
2826
+ superhighlightOnMinimapHover: true,
2827
+ whenHovering: {
2828
+ showProjectionLineX: true,
2829
+ showProjectionLineY: true,
2830
+ higlightValueX: true,
2831
+ higlightValueY: true
2832
+ },
2833
+ labels: {
2834
+ enabled: true,
2835
+ dragging: true,
2836
+ removeLabelBox: false
2837
+ },
2838
+ margin: {
2839
+ left: 0,
2840
+ top: 0
2841
+ }
2842
+ },
2843
+ "data-warning": {
2844
+ margin: {
2845
+ LARGE: { bottom: 90 },
2846
+ MEDIUM: { bottom: 70 },
2847
+ SMALL: { bottom: 50 }
2848
+ }
2840
2849
  }
2841
2850
  };
2842
2851
 
@@ -2845,6 +2854,7 @@
2845
2854
  BubbleChart.DEFAULT_CORE = (markerName) => ({
2846
2855
  requiredEncodings: ["x", "y", "size"],
2847
2856
  encoding: {
2857
+ "show": { modelType: "selection" },
2848
2858
  "selected": {
2849
2859
  modelType: "selection",
2850
2860
  data: {
@@ -2887,6 +2897,7 @@
2887
2897
  constant: "_default"
2888
2898
  },
2889
2899
  scale: {
2900
+ extent: [0, 0.35],
2890
2901
  modelType: "size",
2891
2902
  allowedTypes: ["linear", "point"]
2892
2903
  }
@@ -2898,7 +2909,7 @@
2898
2909
  }
2899
2910
  });
2900
2911
 
2901
- BubbleChart.versionInfo = { version: "4.2.0", build: 1738001668539, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
2912
+ BubbleChart.versionInfo = { version: "4.4.0", build: 1743007605486, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
2902
2913
 
2903
2914
  exports.Base = BubbleChart;
2904
2915