@vizabi/bubblechart 3.12.0 → 3.13.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.
- package/build/bubblechart.css +3 -8
- package/build/bubblechart.js +20 -23
- package/build/bubblechart.js.map +1 -1
- package/build/stats.html +1 -1
- package/package.json +1 -1
package/build/bubblechart.css
CHANGED
|
@@ -171,22 +171,20 @@
|
|
|
171
171
|
.vzb-tool .vzb-bubblechart .vzb-bubblechart-svg .vzb-bc-axis-y-subtitle .tick-minor,
|
|
172
172
|
.vzb-tool .vzb-bubblechart .vzb-bubblechart-svg .vzb-bc-axis-x .tick-minor,
|
|
173
173
|
.vzb-tool .vzb-bubblechart .vzb-bubblechart-svg .vzb-bc-axis-y .tick-minor {
|
|
174
|
-
stroke
|
|
174
|
+
stroke: #d6d6d6;
|
|
175
175
|
}
|
|
176
176
|
.vzb-tool.vzb-medium .vzb-bubblechart-svg .vzb-bc-axis-x .tick line,
|
|
177
177
|
.vzb-tool.vzb-medium .vzb-bubblechart-svg .vzb-bc-axis-y .tick line,
|
|
178
178
|
.vzb-tool.vzb-medium .vzb-bubblechart-svg .vzb-bc-axis-x .tick-minor,
|
|
179
179
|
.vzb-tool.vzb-medium .vzb-bubblechart-svg .vzb-bc-axis-y .tick-minor {
|
|
180
|
-
stroke: #
|
|
181
|
-
stroke-dasharray: 1 6;
|
|
180
|
+
stroke: #d6d6d6;
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
.vzb-tool.vzb-large .vzb-bubblechart-svg .vzb-bc-axis-x .tick line,
|
|
185
184
|
.vzb-tool.vzb-large .vzb-bubblechart-svg .vzb-bc-axis-y .tick line,
|
|
186
185
|
.vzb-tool.vzb-large .vzb-bubblechart-svg .vzb-bc-axis-x .tick-minor,
|
|
187
186
|
.vzb-tool.vzb-large .vzb-bubblechart-svg .vzb-bc-axis-y .tick-minor {
|
|
188
|
-
stroke: #
|
|
189
|
-
stroke-dasharray: none;
|
|
187
|
+
stroke: #d6d6d6;
|
|
190
188
|
}
|
|
191
189
|
|
|
192
190
|
.vzb-tool.vzb-presentation .vzb-bubblechart-svg .vzb-bc-axis-x .tick line,
|
|
@@ -194,7 +192,6 @@
|
|
|
194
192
|
.vzb-tool.vzb-presentation .vzb-bubblechart-svg .vzb-bc-axis-x .tick-minor,
|
|
195
193
|
.vzb-tool.vzb-presentation .vzb-bubblechart-svg .vzb-bc-axis-y .tick-minor {
|
|
196
194
|
stroke: none;
|
|
197
|
-
stroke-dasharray: none;
|
|
198
195
|
}
|
|
199
196
|
|
|
200
197
|
.vzb-tool .vzb-bubblechart .vzb-bubblechart-svg .vzb-bc-axis-x-info,
|
|
@@ -512,8 +509,6 @@
|
|
|
512
509
|
stroke-width: 1px;
|
|
513
510
|
}
|
|
514
511
|
.vzb-tool .vzb-bubblechart .vzb-bubblechart-svg .vzb-bc-date {
|
|
515
|
-
filter: alpha(opacity=30);
|
|
516
|
-
opacity: 0.3;
|
|
517
512
|
font-size: 15em;
|
|
518
513
|
fill: #999;
|
|
519
514
|
text-anchor: middle;
|
package/build/bubblechart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// https://github.com/vizabi/bubblechart#readme v3.
|
|
1
|
+
// https://github.com/vizabi/bubblechart#readme v3.13.2 build 1642697876953 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) :
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
// this.dragLock = false;
|
|
17
17
|
|
|
18
18
|
this.dragRectangle
|
|
19
|
+
.filter(event => !event.button)
|
|
19
20
|
.subject(this.dragSubject())
|
|
20
21
|
.on("start", this.drag().start)
|
|
21
22
|
.on("drag", this.drag().go)
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
return {
|
|
57
|
-
x: d3.pointer(event)[0],
|
|
58
|
-
y: d3.pointer(event)[1]
|
|
58
|
+
x: d3.pointer(event, this)[0],
|
|
59
|
+
y: d3.pointer(event, this)[1]
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
62
|
}
|
|
@@ -80,8 +81,8 @@
|
|
|
80
81
|
|
|
81
82
|
// self.dragLock = true;
|
|
82
83
|
this.origin = {
|
|
83
|
-
x: d3.pointer(event)[0],
|
|
84
|
-
y: d3.pointer(event)[1]
|
|
84
|
+
x: d3.pointer(event, this)[0],
|
|
85
|
+
y: d3.pointer(event, this)[1]
|
|
85
86
|
};
|
|
86
87
|
_this.DOM.zoomRect.classed("vzb-invisible", false);
|
|
87
88
|
},
|
|
@@ -110,8 +111,8 @@
|
|
|
110
111
|
.classed("vzb-invisible", true);
|
|
111
112
|
|
|
112
113
|
this.target = {
|
|
113
|
-
x: d3.pointer(event)[0],
|
|
114
|
-
y: d3.pointer(event)[1]
|
|
114
|
+
x: d3.pointer(event, this)[0],
|
|
115
|
+
y: d3.pointer(event, this)[1]
|
|
115
116
|
};
|
|
116
117
|
if (Math.abs(this.origin.x - this.target.x) < 10 || Math.abs(this.origin.y - this.target.y) < 10) return;
|
|
117
118
|
|
|
@@ -647,7 +648,7 @@
|
|
|
647
648
|
let ratio = transform.k;
|
|
648
649
|
const pan = [transform.x, transform.y];
|
|
649
650
|
|
|
650
|
-
const mouse = d3.pointer(event);
|
|
651
|
+
const mouse = d3.pointer(event, this.zoomSelection.node());
|
|
651
652
|
let k = Math.log(ratio) / Math.LN2;
|
|
652
653
|
|
|
653
654
|
//change factor direction based on the input. default is no direction supplied
|
|
@@ -965,7 +966,7 @@
|
|
|
965
966
|
<rect class="vzb-bc-eventarea"></rect>
|
|
966
967
|
<g class="vzb-bc-trails"></g>
|
|
967
968
|
<g class="vzb-bc-bubbles"></g>
|
|
968
|
-
<rect class="vzb-bc-forecastoverlay vzb-hidden" x="0" y="0" width="100%" height="100%" fill="url(#vzb-bc-pattern-lines)" pointer-events='none'></rect>
|
|
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>
|
|
969
970
|
</svg>
|
|
970
971
|
|
|
971
972
|
<g class="vzb-bc-axis-y-subtitle"><text></text></g>
|
|
@@ -997,10 +998,10 @@
|
|
|
997
998
|
</svg>
|
|
998
999
|
<svg width="0" height="0">
|
|
999
1000
|
<defs>
|
|
1000
|
-
<filter id="vzb-glow-filter" x="-50%" y="-50%" width="200%" height="200%">
|
|
1001
|
+
<filter id="vzb-glow-filter-${config.id}" x="-50%" y="-50%" width="200%" height="200%">
|
|
1001
1002
|
<feGaussianBlur in="SourceGraphic" stdDeviation="2"></feGaussianBlur>
|
|
1002
1003
|
</filter>
|
|
1003
|
-
<pattern id="vzb-bc-pattern-lines" x="0" y="0" patternUnits="userSpaceOnUse" width="50" height="50" viewBox="0 0 10 10">
|
|
1004
|
+
<pattern id="vzb-bc-pattern-lines-${config.id}" x="0" y="0" patternUnits="userSpaceOnUse" width="50" height="50" viewBox="0 0 10 10">
|
|
1004
1005
|
<path d='M-1,1 l2,-2M0,10 l10,-10M9,11 l2,-2' stroke='black' stroke-width='3' opacity='0.08'/>
|
|
1005
1006
|
</pattern>
|
|
1006
1007
|
</defs>
|
|
@@ -1070,7 +1071,7 @@
|
|
|
1070
1071
|
|
|
1071
1072
|
//set filter
|
|
1072
1073
|
this.DOM.bubbleCrown.selectAll(".vzb-crown-glow")
|
|
1073
|
-
.attr("filter",
|
|
1074
|
+
.attr("filter", `url(${location.pathname}#vzb-glow-filter-${this.id})`);
|
|
1074
1075
|
|
|
1075
1076
|
this._date = this.findChild({type: "DateTimeBackground"});
|
|
1076
1077
|
this._labels = this.findChild({type: "Labels"});
|
|
@@ -1191,7 +1192,7 @@
|
|
|
1191
1192
|
}
|
|
1192
1193
|
|
|
1193
1194
|
draw() {
|
|
1194
|
-
this.localise = this.services.locale.auto();
|
|
1195
|
+
this.localise = this.services.locale.auto(this.MDL.frame.interval);
|
|
1195
1196
|
|
|
1196
1197
|
//this.MDL.trail.config.show = false;
|
|
1197
1198
|
//this.ui.cursorMode = "plus";
|
|
@@ -1767,10 +1768,6 @@
|
|
|
1767
1768
|
const infoElHeight = this.profileConstants.infoElHeight;
|
|
1768
1769
|
const xAxisTitleBottomMargin = this.profileConstants.xAxisTitleBottomMargin;
|
|
1769
1770
|
|
|
1770
|
-
//labels
|
|
1771
|
-
this._labels.setCloseCrossHeight(_this.profileConstants.infoElHeight * 1.2);
|
|
1772
|
-
this._labels.setTooltipFontSize(_this.profileConstants.infoElHeight + "px");
|
|
1773
|
-
|
|
1774
1771
|
//stage
|
|
1775
1772
|
const height = this.height = (this.elementHeight - margin.top - margin.bottom) || 0;
|
|
1776
1773
|
const width = this.width = (this.elementWidth - margin.left * this.profileConstants.leftMarginRatio - margin.right) || 0;
|
|
@@ -2290,7 +2287,7 @@
|
|
|
2290
2287
|
let text = "";
|
|
2291
2288
|
|
|
2292
2289
|
text = isSelected ?
|
|
2293
|
-
!trailShow || isTailTrail || (!isTrail && !this.hoverBubble) ? "": this.localise(d
|
|
2290
|
+
!trailShow || isTailTrail || (!isTrail && !this.hoverBubble) ? "": this.localise(d[trailGroupDim])
|
|
2294
2291
|
:
|
|
2295
2292
|
this.__labelWithoutFrame(d);
|
|
2296
2293
|
|
|
@@ -2467,7 +2464,7 @@
|
|
|
2467
2464
|
if (typeof d.label == "object")
|
|
2468
2465
|
return Object.entries(d.label)
|
|
2469
2466
|
.filter(entry => entry[0] != this.MDL.frame.data.concept)
|
|
2470
|
-
.map(entry => entry[1])
|
|
2467
|
+
.map(entry => VizabiSharedComponents.LegacyUtils.isNumber(entry[1]) ? (entry[0] + ": " + entry[1]) : entry[1])
|
|
2471
2468
|
.join(", ");
|
|
2472
2469
|
if (d.label != null) return "" + d.label;
|
|
2473
2470
|
return d[Symbol.for("key")];
|
|
@@ -2552,8 +2549,8 @@
|
|
|
2552
2549
|
placeholder: ".vzb-repeater",
|
|
2553
2550
|
model: marker,
|
|
2554
2551
|
options: {
|
|
2555
|
-
|
|
2556
|
-
|
|
2552
|
+
repeatedComponent: VizabiBubbleChart,
|
|
2553
|
+
repeatedComponentCssClass: "vzb-bubblechart"
|
|
2557
2554
|
},
|
|
2558
2555
|
name: "chart",
|
|
2559
2556
|
},{
|
|
@@ -2605,7 +2602,7 @@
|
|
|
2605
2602
|
}];
|
|
2606
2603
|
|
|
2607
2604
|
config.template = `
|
|
2608
|
-
<div class="vzb-repeater
|
|
2605
|
+
<div class="vzb-repeater"></div>
|
|
2609
2606
|
<div class="vzb-animationcontrols">
|
|
2610
2607
|
<div class="vzb-timeslider"></div>
|
|
2611
2608
|
<div class="vzb-speedslider"></div>
|
|
@@ -2684,7 +2681,7 @@
|
|
|
2684
2681
|
}
|
|
2685
2682
|
});
|
|
2686
2683
|
|
|
2687
|
-
BubbleChart.versionInfo = { version: "3.
|
|
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};
|
|
2688
2685
|
|
|
2689
2686
|
return BubbleChart;
|
|
2690
2687
|
|