@vizabi/bubblechart 5.3.0 → 5.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.
@@ -1,4 +1,4 @@
1
- // https://github.com/vizabi/bubblechart#readme v5.3.0 build 1750548202909 Copyright 2025 Gapminder Foundation and contributors
1
+ // https://github.com/vizabi/bubblechart#readme v5.4.0 build 1763740005307 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) :
@@ -46135,15 +46135,14 @@ void main(void) {
46135
46135
 
46136
46136
  constructor(config){
46137
46137
 
46138
- const markerName = config.options?.markerNames?.bubble || "bubble";
46139
- const fullMarker = config.model.markers[markerName];
46140
- config.Vizabi.utils.applyDefaults(fullMarker.config, BubbleChart.DEFAULT_CORE(markerName));
46138
+ const fullMarker = config.model.markers?.bubble;
46139
+ const fullMarkerLegend = config.model.markers?.legend;
46140
+ config.Vizabi.utils.applyDefaults(fullMarker?.config, BubbleChart.DEFAULT_MODEL.bubble);
46141
+ config.Vizabi.utils.applyDefaults(fullMarkerLegend?.config || {}, BubbleChart.DEFAULT_MODEL.legend);
46141
46142
 
46142
46143
  const frameType = config.Vizabi.stores.encodings.modelTypes.frame;
46143
46144
  const { marker, splashMarker } = frameType.splashMarker(fullMarker);
46144
46145
 
46145
- config.model.markers[markerName] = marker;
46146
-
46147
46146
  config.name = "bubblechart";
46148
46147
 
46149
46148
  config.subcomponents = [{
@@ -46195,12 +46194,6 @@ void main(void) {
46195
46194
  placeholder: ".vzb-buttonlist",
46196
46195
  model: marker,
46197
46196
  name: "buttons"
46198
- },{
46199
- type: sharedComponents.SpaceConfig,
46200
- placeholder: ".vzb-spaceconfig",
46201
- options: {button: ".vzb-spaceconfig-button"},
46202
- model: marker,
46203
- name: "space-config"
46204
46197
  },{
46205
46198
  type: sharedComponents.ErrorMessage,
46206
46199
  placeholder: ".vzb-errormessage",
@@ -46221,7 +46214,6 @@ void main(void) {
46221
46214
  <div class="vzb-treemenu"></div>
46222
46215
  <div class="vzb-marker-contextmenu"></div>
46223
46216
  <div class="vzb-datawarning"></div>
46224
- <div class="vzb-spaceconfig"></div>
46225
46217
  <div class="vzb-datanotes"></div>
46226
46218
  <div class="vzb-errormessage"></div>
46227
46219
  `;
@@ -46241,9 +46233,12 @@ void main(void) {
46241
46233
  }
46242
46234
 
46243
46235
  BubbleChart.DEFAULT_UI = {
46236
+ "locale": { "id": "en", "shortNumberFormat": true },
46237
+ "layout": { "projector": false },
46238
+
46244
46239
  //ui
46245
46240
  "buttons": {
46246
- "buttons": ["colors", "markercontrols", "trails", "moreoptions", "presentation", "sidebarcollapse", "fullscreen"]
46241
+ "buttons": ["markercontrols", "colors", "trails", "moreoptions", "presentation", "sidebarcollapse", "fullscreen"]
46247
46242
  },
46248
46243
  "dialogs": {
46249
46244
  "dialogs": {
@@ -46251,116 +46246,191 @@ void main(void) {
46251
46246
  "sidebar": ["colors", "markercontrols", "size", "zoom"],
46252
46247
  "moreoptions": ["opacity", "speed", "axes", "size", "colors", "label", "zoom", "technical", "repeat", "presentation", "about"]
46253
46248
  },
46254
- "markercontrols": {}
46249
+ "markercontrols": {
46250
+ "disableSlice": true,
46251
+ "disableAddRemoveGroups": true,
46252
+ "primaryDim": null,
46253
+ "drilldown": null,
46254
+ "shortcutForSwitch": false,
46255
+ "shortcutForSwitch_allow": null
46256
+ }
46255
46257
  },
46256
- chart: {
46257
- show_ticks: true,
46258
- showForecast: false,
46259
- showForecastOverlay: true,
46260
- pauseBeforeForecast: true,
46261
- opacityHighlight: 1.0,
46262
- opacitySelect: 1.0,
46263
- opacityHighlightDim: 0.1,
46264
- opacitySelectDim: 0.3,
46265
- opacityRegular: 0.8,
46266
- timeInBackground: true,
46267
- timeInTrails: true,
46268
- lockNonSelected: 0,
46269
- panWithArrow: false,
46270
- adaptMinMaxZoom: false,
46271
- cursorMode: "arrow",
46272
- zoomOnScrolling: true,
46273
- decorations: {
46274
- enabled: true,
46275
- xAxisGroups: null //left to be set by external page
46258
+ "marker-contextmenu": {
46259
+ "primaryDim": null,
46260
+ "drilldown": null,
46261
+ },
46262
+ "chart": {
46263
+ "show_ticks": true,
46264
+ "showForecast": false,
46265
+ "showForecastOverlay": true,
46266
+ "pauseBeforeForecast": true,
46267
+ "endBeforeForecast": null, //value like "2022", auto-resolved to current time minus one frame step
46268
+ "opacityHighlight": 1.0,
46269
+ "opacitySelect": 1.0,
46270
+ "opacityHighlightDim": 0.1,
46271
+ "opacitySelectDim": 0.3,
46272
+ "opacityRegular": 0.8,
46273
+ "timeInBackground": true,
46274
+ "timeInTrails": true,
46275
+ "lockNonSelected": 0,
46276
+ "panWithArrow": true,
46277
+ "adaptMinMaxZoom": false,
46278
+ "cursorMode": "arrow",
46279
+ "zoomOnScrolling": true,
46280
+ "superhighlightOnMinimapHover": true,
46281
+ "whenHovering": {
46282
+ "showProjectionLineX": true,
46283
+ "showProjectionLineY": true,
46284
+ "higlightValueX": true,
46285
+ "higlightValueY": true
46276
46286
  },
46277
- superhighlightOnMinimapHover: true,
46278
- whenHovering: {
46279
- showProjectionLineX: true,
46280
- showProjectionLineY: true,
46281
- higlightValueX: true,
46282
- higlightValueY: true
46287
+ "labels": {
46288
+ "enabled": true,
46289
+ "dragging": true,
46290
+ "removeLabelBox": false
46283
46291
  },
46284
- labels: {
46285
- enabled: true,
46286
- dragging: true,
46287
- removeLabelBox: false
46292
+ "margin": {
46293
+ "left": 0,
46294
+ "top": 0
46288
46295
  },
46289
- margin: {
46290
- left: 0,
46291
- top: 0
46296
+ "decorations": {
46297
+ "enabled": false,
46298
+ "xAxisGroups": null //left to be set by external page. example: {
46299
+ // "gdp_pcap": [
46300
+ // { "min": null, "max": 2650, "label": "incomegroups/level1", "label_short": "incomegroups/level1short" },
46301
+ // { "min": 2650, "max": 8000, "label": "incomegroups/level2", "label_short": "incomegroups/level2short" },
46302
+ // { "min": 8000, "max": 24200, "label": "incomegroups/level3", "label_short": "incomegroups/level3short" },
46303
+ // { "min": 24200, "max": null, "label": "incomegroups/level4", "label_short": "incomegroups/level4short" }
46304
+ // ]
46305
+ // }
46292
46306
  }
46293
46307
  },
46294
46308
  "data-warning": {
46295
- margin: {
46296
- LARGE: { bottom: 90 },
46297
- MEDIUM: { bottom: 70 },
46298
- SMALL: { bottom: 50 }
46309
+ "enable": false,
46310
+ "margin": {
46311
+ "LARGE": { "bottom": 90 },
46312
+ "MEDIUM": { "bottom": 70 },
46313
+ "SMALL": { "bottom": 50 }
46299
46314
  }
46315
+ },
46316
+ "tree-menu": {
46317
+ "showDataSources": false,
46318
+ "folderStrategyByDataset": {}
46300
46319
  }
46301
46320
  };
46302
46321
 
46303
46322
  BubbleChart.mainComponent = VizabiBubbleChart;
46304
46323
 
46305
- BubbleChart.DEFAULT_CORE = (markerName) => ({
46306
- requiredEncodings: ["x", "y", "size"],
46307
- encoding: {
46308
- "show": { modelType: "selection" },
46309
- "selected": {
46310
- modelType: "selection",
46311
- data: {
46312
- filter: {
46313
- ref: `markers.${markerName}.encoding.trail.data.filter`
46324
+ BubbleChart.DEFAULT_MODEL = {
46325
+ "bubble": {
46326
+ "requiredEncodings": ["x", "y", "size"],
46327
+ "encoding": {
46328
+ "show": { "modelType": "selection" },
46329
+ "selected": {
46330
+ "modelType": "selection",
46331
+ "data": {
46332
+ "filter": {
46333
+ "ref": `markers.bubble.encoding.trail.data.filter`
46334
+ }
46314
46335
  }
46336
+ },
46337
+ "highlighted": { "modelType": "selection" },
46338
+ "superhighlighted": { "modelType": "selection" },
46339
+ "x": {
46340
+ "data": { },
46341
+ "scale": {
46342
+ "allowedTypes": ["linear", "log", "genericLog", "pow", "time"]
46343
+ }
46344
+ },
46345
+ "y": {
46346
+ "modelType": "lane",
46347
+ "data": { },
46348
+ "scale": {
46349
+ "allowedTypes": ["linear", "log", "genericLog", "pow", "time", "rank"]
46350
+ }
46351
+ },
46352
+ "order": {
46353
+ "modelType": "order",
46354
+ "direction": "desc",
46355
+ "data": {
46356
+ "ref": `markers.bubble.encoding.size.data.config`
46357
+ }
46358
+ },
46359
+ "size": {
46360
+ "data": { },
46361
+ "scale": {
46362
+ "modelType": "size",
46363
+ "allowedTypes": ["linear", "point"],
46364
+ "range": [0, 50],
46365
+ "extent": [0, 1]
46366
+ }
46367
+ },
46368
+ "color": {
46369
+ "data": { "constant": "_default" },
46370
+ "scale": {
46371
+ "modelType": "color"
46372
+ }
46373
+ },
46374
+ "label": { "data": { "modelType": "entityPropertyDataConfig" } },
46375
+ "frame": { "modelType": "frame", "speed": 200, "splash": true },
46376
+ "trail": { "modelType": "trail", "show": false },
46377
+ "size_label": {
46378
+ "data": {
46379
+ "constant": "_default"
46380
+ },
46381
+ "scale": {
46382
+ "extent": [0, 0.22],
46383
+ "modelType": "size",
46384
+ "allowedTypes": ["linear", "point"],
46385
+ }
46386
+ },
46387
+ "repeat": {
46388
+ "modelType": "repeat",
46389
+ "useConnectedRowsAndColumns": true,
46390
+ "row": ["y"],
46391
+ "column": ["x"],
46392
+ "allowEnc": ["y", "x"]
46315
46393
  }
46316
- },
46317
- "highlighted": { modelType: "selection" },
46318
- "superhighlighted": { modelType: "selection" },
46319
- "x": {
46320
- scale: {
46321
- allowedTypes: ["linear", "log", "genericLog", "pow", "time"]
46322
- }
46323
- },
46324
- "y": {
46325
- modelType: "lane",
46326
- scale: {
46327
- allowedTypes: ["linear", "log", "genericLog", "pow", "time", "rank"]
46328
- }
46329
- },
46330
- "order": { modelType: "order",
46331
- data: {
46332
- ref: `markers.${markerName}.encoding.size.data.config`
46333
- }
46334
- },
46335
- "size": {
46336
- scale: {
46337
- modelType: "size",
46338
- allowedTypes: ["linear", "point"],
46339
- range: [0, 50]
46394
+ }
46395
+ },
46396
+ "legend": {
46397
+ "data": {
46398
+ "ref": {
46399
+ "transform": "entityConceptSkipFilter",
46400
+ "path": "markers.bubble.encoding.color"
46340
46401
  }
46341
46402
  },
46342
- "color": { scale: { modelType: "color" } },
46343
- "label": { data: { modelType: "entityPropertyDataConfig" } },
46344
- "frame": { modelType: "frame" },
46345
- "trail": { modelType: "trail" },
46346
- "size_label": {
46347
- data: {
46348
- constant: "_default"
46403
+ "encoding": {
46404
+ "color": {
46405
+ "data": {
46406
+ "concept": { "ref": "markers.bubble.encoding.color.data.concept" },
46407
+ "constant": { "ref": "markers.bubble.encoding.color.data.constant" }
46408
+ },
46409
+ "scale": {
46410
+ "modelType": "color",
46411
+ "palette": { "ref": "markers.bubble.encoding.color.scale.palette" },
46412
+ "domain": null,
46413
+ "range": null,
46414
+ "type": null,
46415
+ "zoomed": null,
46416
+ "zeroBaseline": false,
46417
+ "clamp": false,
46418
+ "allowedTypes": null
46419
+ }
46420
+ //"scale": { "ref": "markers.bubble.encoding.color.scale" }
46349
46421
  },
46350
- scale: {
46351
- extent: [0, 0.35],
46352
- modelType: "size",
46353
- allowedTypes: ["linear", "point"]
46354
- }
46355
- },
46356
- "repeat": {
46357
- modelType: "repeat",
46358
- allowEnc: ["y", "x"]
46422
+ "name": { "data": { } },
46423
+ "order": {
46424
+ "modelType": "order",
46425
+ "direction": "asc",
46426
+ "data": { }
46427
+ },
46428
+ "map": { "data": { } }
46359
46429
  }
46360
- }
46361
- });
46430
+ },
46431
+ };
46362
46432
 
46363
- BubbleChart.versionInfo = { version: "5.3.0", build: 1750548202909, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
46433
+ BubbleChart.versionInfo = { version: "5.4.0", build: 1763740005307, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
46364
46434
 
46365
46435
  exports.Base = BubbleChart;
46366
46436