billboard.js 3.4.0-next.2 → 3.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.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +47 -18
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +93 -32
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +9 -5
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +9 -5
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +9 -5
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +9 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +55 -19
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +55 -19
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +55 -19
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +55 -19
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist-esm/billboard.js +38 -18
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +7 -4
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +8 -8
- package/src/ChartInternal/ChartInternal.ts +19 -8
- package/src/ChartInternal/shape/arc.ts +1 -1
- package/src/ChartInternal/shape/bar.ts +1 -1
- package/src/ChartInternal/shape/point.ts +6 -3
- package/src/module/generator.ts +7 -1
- package/src/module/util.ts +4 -2
package/dist/billboard.css
CHANGED
package/dist/billboard.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.4.0
|
|
8
|
+
* @version 3.4.0
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -1087,9 +1087,13 @@ function parseDate(date) {
|
|
|
1087
1087
|
if (date instanceof Date) {
|
|
1088
1088
|
parsedDate = date;
|
|
1089
1089
|
} else if (isString(date)) {
|
|
1090
|
-
var
|
|
1090
|
+
var _format$dataTime,
|
|
1091
|
+
config = this.config,
|
|
1091
1092
|
format = this.format;
|
|
1092
|
-
|
|
1093
|
+
|
|
1094
|
+
// if fails to parse, try by new Date()
|
|
1095
|
+
// https://github.com/naver/billboard.js/issues/1714
|
|
1096
|
+
parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
|
|
1093
1097
|
} else if (isNumber(date) && !isNaN(date)) {
|
|
1094
1098
|
parsedDate = new Date(+date);
|
|
1095
1099
|
}
|
|
@@ -1108,7 +1112,7 @@ function parseDate(date) {
|
|
|
1108
1112
|
|
|
1109
1113
|
|
|
1110
1114
|
function isTabVisible() {
|
|
1111
|
-
return !browser_doc.
|
|
1115
|
+
return (browser_doc == null ? void 0 : browser_doc.hidden) === !1 || (browser_doc == null ? void 0 : browser_doc.visibilityState) === "visible";
|
|
1112
1116
|
}
|
|
1113
1117
|
/**
|
|
1114
1118
|
* Get the current input type
|
|
@@ -3630,6 +3634,12 @@ function generateWait() {
|
|
|
3630
3634
|
if (t === !0 || t.empty != null && t.empty()) {
|
|
3631
3635
|
done++;
|
|
3632
3636
|
continue;
|
|
3637
|
+
} // when tab isn't visible exit loop
|
|
3638
|
+
|
|
3639
|
+
|
|
3640
|
+
if (isTabVisible() === !1) {
|
|
3641
|
+
done = transitionsToWait.length;
|
|
3642
|
+
break;
|
|
3633
3643
|
}
|
|
3634
3644
|
|
|
3635
3645
|
try {
|
|
@@ -10139,27 +10149,40 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10139
10149
|
}
|
|
10140
10150
|
|
|
10141
10151
|
helper(_type);
|
|
10142
|
-
} //
|
|
10152
|
+
} // Point types
|
|
10153
|
+
|
|
10143
10154
|
|
|
10155
|
+
var hasPointType = $$.hasType("bubble") || $$.hasType("scatter");
|
|
10144
10156
|
|
|
10145
|
-
if (
|
|
10157
|
+
if (hasPointType) {
|
|
10146
10158
|
$$.updateTargetForCircle == null ? void 0 : $$.updateTargetForCircle();
|
|
10147
10159
|
} // Fade-in each chart
|
|
10148
10160
|
|
|
10149
10161
|
|
|
10150
|
-
$$.
|
|
10162
|
+
$$.filterTargetsToShowAtInit(hasPointType);
|
|
10151
10163
|
}
|
|
10152
10164
|
/**
|
|
10153
|
-
* Display targeted elements
|
|
10165
|
+
* Display targeted elements at initialization
|
|
10166
|
+
* @param {boolean} hasPointType whether has point type(bubble, scatter) or not
|
|
10154
10167
|
* @private
|
|
10155
10168
|
*/
|
|
10156
10169
|
;
|
|
10157
10170
|
|
|
10158
|
-
_proto.
|
|
10171
|
+
_proto.filterTargetsToShowAtInit = function filterTargetsToShowAtInit(hasPointType) {
|
|
10172
|
+
if (hasPointType === void 0) {
|
|
10173
|
+
hasPointType = !1;
|
|
10174
|
+
}
|
|
10175
|
+
|
|
10159
10176
|
var $$ = this,
|
|
10160
10177
|
svg = $$.$el.svg,
|
|
10161
|
-
$T = $$.$T
|
|
10162
|
-
|
|
10178
|
+
$T = $$.$T,
|
|
10179
|
+
selector = "." + $COMMON.target;
|
|
10180
|
+
|
|
10181
|
+
if (hasPointType) {
|
|
10182
|
+
selector += ", ." + $CIRCLE.chartCircles + " > ." + $CIRCLE.circles;
|
|
10183
|
+
}
|
|
10184
|
+
|
|
10185
|
+
$T(svg.selectAll(selector).filter(function (d) {
|
|
10163
10186
|
return $$.isTargetToShow(d.id);
|
|
10164
10187
|
})).style("opacity", null);
|
|
10165
10188
|
};
|
|
@@ -10194,8 +10217,9 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10194
10217
|
|
|
10195
10218
|
_proto.initialOpacity = function initialOpacity(d) {
|
|
10196
10219
|
var $$ = this,
|
|
10197
|
-
withoutFadeIn = $$.state.withoutFadeIn
|
|
10198
|
-
|
|
10220
|
+
withoutFadeIn = $$.state.withoutFadeIn,
|
|
10221
|
+
r = $$.getBaseValue(d) !== null && withoutFadeIn[d.id] ? null : "0";
|
|
10222
|
+
return r;
|
|
10199
10223
|
};
|
|
10200
10224
|
|
|
10201
10225
|
_proto.bindResize = function bindResize() {
|
|
@@ -17844,7 +17868,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17844
17868
|
|
|
17845
17869
|
/**
|
|
17846
17870
|
* Set transform attributes to arc label text
|
|
17847
|
-
* @param {
|
|
17871
|
+
* @param {object} d Data object
|
|
17848
17872
|
* @returns {string} Translate attribute string
|
|
17849
17873
|
* @private
|
|
17850
17874
|
*/
|
|
@@ -18665,7 +18689,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18665
18689
|
|
|
18666
18690
|
/**
|
|
18667
18691
|
* Determine if given stacking bar data is radius type
|
|
18668
|
-
* @param {
|
|
18692
|
+
* @param {object} d Data row
|
|
18669
18693
|
* @returns {boolean}
|
|
18670
18694
|
*/
|
|
18671
18695
|
isStackingRadiusData: function isStackingRadiusData(d) {
|
|
@@ -19524,7 +19548,7 @@ var getTransitionName = function () {
|
|
|
19524
19548
|
targets = data.targets.filter(function (d) {
|
|
19525
19549
|
return _this.isScatterType(d) || _this.isBubbleType(d);
|
|
19526
19550
|
});
|
|
19527
|
-
var mainCircle = $el.main.select("." + $CIRCLE.chartCircles).style("pointer-events", "none").selectAll("." + $CIRCLE.circles).data(targets)
|
|
19551
|
+
var mainCircle = $el.main.select("." + $CIRCLE.chartCircles).style("pointer-events", "none").selectAll("." + $CIRCLE.circles).data(targets);
|
|
19528
19552
|
mainCircle.exit().remove();
|
|
19529
19553
|
enterNode = mainCircle.enter();
|
|
19530
19554
|
} // Circles for each data point on lines
|
|
@@ -19535,6 +19559,11 @@ var getTransitionName = function () {
|
|
|
19535
19559
|
});
|
|
19536
19560
|
enterNode.append("g").attr("class", classCircles).style("cursor", function (d) {
|
|
19537
19561
|
return isFunction(isSelectable) && isSelectable(d) ? "pointer" : null;
|
|
19562
|
+
}).style("opacity", function () {
|
|
19563
|
+
var _this$parentNode;
|
|
19564
|
+
|
|
19565
|
+
// if the parent node is .bb-chart-circles (bubble, scatter), initialize <g bb-circles> with opacity "0"
|
|
19566
|
+
return (_this$parentNode = this.parentNode) != null && _this$parentNode.classList.contains("bb-chart-circles") ? "0" : null;
|
|
19538
19567
|
}); // Update date for selected circles
|
|
19539
19568
|
|
|
19540
19569
|
selectionEnabled && targets.forEach(function (t) {
|
|
@@ -23408,7 +23437,7 @@ var _defaults = {},
|
|
|
23408
23437
|
* bb.version; // "1.0.0"
|
|
23409
23438
|
* @memberof bb
|
|
23410
23439
|
*/
|
|
23411
|
-
version: "3.4.0
|
|
23440
|
+
version: "3.4.0",
|
|
23412
23441
|
|
|
23413
23442
|
/**
|
|
23414
23443
|
* Generate chart
|
|
@@ -23543,7 +23572,7 @@ var _defaults = {},
|
|
|
23543
23572
|
};
|
|
23544
23573
|
/**
|
|
23545
23574
|
* @namespace bb
|
|
23546
|
-
* @version 3.4.0
|
|
23575
|
+
* @version 3.4.0
|
|
23547
23576
|
*/
|
|
23548
23577
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
23549
23578
|
/**
|
package/dist/billboard.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.4.0
|
|
8
|
+
* @version 3.4.0
|
|
9
9
|
*/.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}
|