billboard.js 3.11.0 → 3.11.1
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 +52 -28
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +48 -22
- package/dist/billboard.pkgd.min.js +4 -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 +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- 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/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +32 -14
- 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 +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +16 -14
- package/src/ChartInternal/Axis/AxisRenderer.ts +2 -1
- package/src/ChartInternal/interactions/zoom.ts +9 -3
- package/src/ChartInternal/internals/title.ts +2 -2
- package/src/ChartInternal/internals/tooltip.ts +1 -1
- package/src/ChartInternal/shape/shape.ts +18 -6
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.11.
|
|
8
|
+
* @version 3.11.1
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
var a = typeof exports === 'object' ? factory(require("d3-axis"), require("d3-brush"), require("d3-drag"), require("d3-dsv"), require("d3-ease"), require("d3-hierarchy"), require("d3-interpolate"), require("d3-scale"), require("d3-selection"), require("d3-shape"), require("d3-time-format"), require("d3-transition"), require("d3-zoom")) : factory(root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"]);
|
|
17
17
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
18
18
|
}
|
|
19
|
-
})(this, function(__WEBPACK_EXTERNAL_MODULE__10__,
|
|
19
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__14__) {
|
|
20
20
|
return /******/ (function() { // webpackBootstrap
|
|
21
21
|
/******/ "use strict";
|
|
22
22
|
/******/ var __webpack_modules__ = ([
|
|
@@ -213,9 +213,9 @@ function _newArrowCheck(innerThis, boundThis) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
// EXTERNAL MODULE: external {"commonjs":"d3-time-format","commonjs2":"d3-time-format","amd":"d3-time-format","root":"d3"}
|
|
216
|
-
var external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_ = __webpack_require__(
|
|
216
|
+
var external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_ = __webpack_require__(2);
|
|
217
217
|
// EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
|
|
218
|
-
var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(
|
|
218
|
+
var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(3);
|
|
219
219
|
;// CONCATENATED MODULE: ./src/module/browser.ts
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -378,7 +378,7 @@ function _defineProperty(obj, key, value) {
|
|
|
378
378
|
return obj;
|
|
379
379
|
}
|
|
380
380
|
// EXTERNAL MODULE: external {"commonjs":"d3-brush","commonjs2":"d3-brush","amd":"d3-brush","root":"d3"}
|
|
381
|
-
var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(
|
|
381
|
+
var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(4);
|
|
382
382
|
;// CONCATENATED MODULE: ./src/module/util.ts
|
|
383
383
|
|
|
384
384
|
|
|
@@ -5740,7 +5740,7 @@ function callDone(fn, resizeAfter) {
|
|
|
5740
5740
|
}
|
|
5741
5741
|
});
|
|
5742
5742
|
// EXTERNAL MODULE: external {"commonjs":"d3-drag","commonjs2":"d3-drag","amd":"d3-drag","root":"d3"}
|
|
5743
|
-
var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack_require__(
|
|
5743
|
+
var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack_require__(6);
|
|
5744
5744
|
;// CONCATENATED MODULE: ./src/ChartInternal/interactions/interaction.ts
|
|
5745
5745
|
|
|
5746
5746
|
/**
|
|
@@ -6113,7 +6113,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
6113
6113
|
}
|
|
6114
6114
|
});
|
|
6115
6115
|
// EXTERNAL MODULE: external {"commonjs":"d3-scale","commonjs2":"d3-scale","amd":"d3-scale","root":"d3"}
|
|
6116
|
-
var external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_ = __webpack_require__(
|
|
6116
|
+
var external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_ = __webpack_require__(7);
|
|
6117
6117
|
;// CONCATENATED MODULE: ./src/ChartInternal/internals/color.ts
|
|
6118
6118
|
|
|
6119
6119
|
var color_this = undefined;
|
|
@@ -8597,29 +8597,43 @@ function getGroupedDataPointsFn(d) {
|
|
|
8597
8597
|
return points ? points(d, i)[0][1] : $$.getYScaleById(id)($$.getBaseValue(d));
|
|
8598
8598
|
},
|
|
8599
8599
|
getBarW: function getBarW(type, axis, targetsNum) {
|
|
8600
|
-
var
|
|
8600
|
+
var _config$data_groups,
|
|
8601
|
+
_config$axis_x_min,
|
|
8602
|
+
_config$axis_x_max,
|
|
8603
|
+
_this11 = this;
|
|
8601
8604
|
const $$ = this,
|
|
8602
8605
|
config = $$.config,
|
|
8603
8606
|
org = $$.org,
|
|
8604
8607
|
scale = $$.scale,
|
|
8605
8608
|
maxDataCount = $$.getMaxDataCount(),
|
|
8606
|
-
isGrouped = type === "bar" && config.data_groups.length,
|
|
8609
|
+
isGrouped = type === "bar" && ((_config$data_groups = config.data_groups) == null ? void 0 : _config$data_groups.length),
|
|
8607
8610
|
configName = type + "_width",
|
|
8608
|
-
|
|
8611
|
+
_$$$getZoomTransform = $$.getZoomTransform(),
|
|
8612
|
+
k = _$$$getZoomTransform.k,
|
|
8613
|
+
xMinMax = [(_config$axis_x_min = config.axis_x_min) != null ? _config$axis_x_min : org.xDomain[0], (_config$axis_x_max = config.axis_x_max) != null ? _config$axis_x_max : org.xDomain[1]].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
|
|
8614
|
+
let tickInterval = axis.tickInterval(maxDataCount);
|
|
8615
|
+
if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
|
|
8616
|
+
const isSameMinMax = xMinMax.every(function (v, i) {
|
|
8617
|
+
_newArrowCheck(this, _this11);
|
|
8618
|
+
return v === org.xDomain[i];
|
|
8619
|
+
}.bind(this));
|
|
8620
|
+
tickInterval = org.xDomain.map(function (v, i) {
|
|
8609
8621
|
_newArrowCheck(this, _this11);
|
|
8610
|
-
|
|
8622
|
+
const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
|
|
8623
|
+
return scale.zoom(value);
|
|
8611
8624
|
}.bind(this)).reduce(function (a, c) {
|
|
8612
8625
|
_newArrowCheck(this, _this11);
|
|
8613
8626
|
return Math.abs(a) + c;
|
|
8614
|
-
}.bind(this)) / maxDataCount
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8627
|
+
}.bind(this)) / maxDataCount;
|
|
8628
|
+
}
|
|
8629
|
+
const getWidth = function (id) {
|
|
8630
|
+
_newArrowCheck(this, _this11);
|
|
8631
|
+
const width = id ? config[configName][id] : config[configName],
|
|
8632
|
+
ratio = id ? width.ratio : config[configName + "_ratio"],
|
|
8633
|
+
max = id ? width.max : config[configName + "_max"],
|
|
8634
|
+
w = isNumber(width) ? width : targetsNum ? tickInterval * ratio / targetsNum : 0;
|
|
8635
|
+
return max && w > max ? max : w;
|
|
8636
|
+
}.bind(this);
|
|
8623
8637
|
let result = getWidth();
|
|
8624
8638
|
if (!isGrouped && isObjectType(config[configName])) {
|
|
8625
8639
|
result = {
|
|
@@ -9720,9 +9734,9 @@ function getTextXPos(pos, width) {
|
|
|
9720
9734
|
*/
|
|
9721
9735
|
getTitlePadding: function getTitlePadding() {
|
|
9722
9736
|
const $$ = this,
|
|
9723
|
-
|
|
9737
|
+
title = $$.$el.title,
|
|
9724
9738
|
config = $$.config;
|
|
9725
|
-
return (config.title_padding.top || 0) + $$.getTextRect(
|
|
9739
|
+
return (config.title_padding.top || 0) + (title ? $$.getTextRect(title, $TEXT.title).height : 0) + (config.title_padding.bottom || 0);
|
|
9726
9740
|
}
|
|
9727
9741
|
});
|
|
9728
9742
|
;// CONCATENATED MODULE: ./src/ChartInternal/internals/tooltip.ts
|
|
@@ -10076,8 +10090,9 @@ function getTextXPos(pos, width) {
|
|
|
10076
10090
|
y += 15;
|
|
10077
10091
|
} else if (hasArcType) {
|
|
10078
10092
|
if (!(inputType === "touch")) {
|
|
10093
|
+
var _$$$getTitlePadding;
|
|
10079
10094
|
x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
|
|
10080
|
-
y += hasGauge ? height : height / 2 + tHeight;
|
|
10095
|
+
y += (hasGauge ? height : height / 2 + tHeight) + ((_$$$getTitlePadding = $$.getTitlePadding == null ? void 0 : $$.getTitlePadding()) != null ? _$$$getTitlePadding : 0);
|
|
10081
10096
|
}
|
|
10082
10097
|
} else if (hasTreemap) {
|
|
10083
10098
|
y += tHeight;
|
|
@@ -14530,14 +14545,16 @@ let AxisRenderer = /*#__PURE__*/function () {
|
|
|
14530
14545
|
if (this.params.isCategory) {
|
|
14531
14546
|
interval = tickOffset * 2;
|
|
14532
14547
|
} else {
|
|
14533
|
-
|
|
14548
|
+
var _this$params$owner$sc;
|
|
14549
|
+
const scale = (_this$params$owner$sc = this.params.owner.scale.zoom) != null ? _this$params$owner$sc : this.helper.scale,
|
|
14550
|
+
length = this.g.select("path.domain").node().getTotalLength() - outerTickSize * 2;
|
|
14534
14551
|
interval = length / (size || this.g.selectAll("line").size());
|
|
14535
14552
|
|
|
14536
14553
|
// get the interval by its values
|
|
14537
14554
|
const intervalByValue = tickValues ? tickValues.map(function (v, i, arr) {
|
|
14538
14555
|
_newArrowCheck(this, _this5);
|
|
14539
14556
|
const next = i + 1;
|
|
14540
|
-
return next < arr.length ?
|
|
14557
|
+
return next < arr.length ? scale(arr[next]) - scale(v) : null;
|
|
14541
14558
|
}.bind(this)).filter(Boolean) : [];
|
|
14542
14559
|
interval = Math.min.apply(Math, intervalByValue.concat([interval]));
|
|
14543
14560
|
}
|
|
@@ -25407,9 +25424,9 @@ function selection_objectSpread(e) { for (var r = 1, t; r < arguments.length; r+
|
|
|
25407
25424
|
if (config.zoom_type === "drag" && e && startEvent.clientX === e.clientX && startEvent.clientY === e.clientY) {
|
|
25408
25425
|
return;
|
|
25409
25426
|
}
|
|
25427
|
+
state.zooming = !1;
|
|
25410
25428
|
$$.redrawEventRect();
|
|
25411
25429
|
$$.updateZoom();
|
|
25412
|
-
state.zooming = !1;
|
|
25413
25430
|
|
|
25414
25431
|
// do not call event cb when is .unzoom() is called
|
|
25415
25432
|
!isUnZoom && (e || state.dragging) && callFn(config.zoom_onzoomend, $$.api, (_$$$state$domain2 = $$.state.domain) != null ? _$$$state$domain2 : $$.zoom.getDomain());
|
|
@@ -25546,6 +25563,13 @@ function selection_objectSpread(e) { for (var r = 1, t; r < arguments.length; r+
|
|
|
25546
25563
|
$el.zoomResetBtn.style("display", null);
|
|
25547
25564
|
}
|
|
25548
25565
|
}
|
|
25566
|
+
},
|
|
25567
|
+
getZoomTransform: function getZoomTransform() {
|
|
25568
|
+
const $$ = this,
|
|
25569
|
+
eventRect = $$.$el.eventRect;
|
|
25570
|
+
return eventRect != null && eventRect.node() ? (0,external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomTransform)(eventRect.node()) : {
|
|
25571
|
+
k: 1
|
|
25572
|
+
};
|
|
25549
25573
|
}
|
|
25550
25574
|
});
|
|
25551
25575
|
;// CONCATENATED MODULE: ./src/config/Options/data/selection.ts
|
|
@@ -25926,7 +25950,7 @@ let _defaults = {};
|
|
|
25926
25950
|
|
|
25927
25951
|
/**
|
|
25928
25952
|
* @namespace bb
|
|
25929
|
-
* @version 3.11.
|
|
25953
|
+
* @version 3.11.1
|
|
25930
25954
|
*/
|
|
25931
25955
|
const bb = {
|
|
25932
25956
|
/**
|
|
@@ -25936,7 +25960,7 @@ const bb = {
|
|
|
25936
25960
|
* bb.version; // "1.0.0"
|
|
25937
25961
|
* @memberof bb
|
|
25938
25962
|
*/
|
|
25939
|
-
version: "3.11.
|
|
25963
|
+
version: "3.11.1",
|
|
25940
25964
|
/**
|
|
25941
25965
|
* Generate chart
|
|
25942
25966
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
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.11.
|
|
8
|
+
* @version 3.11.1
|
|
9
9
|
*/.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.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-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{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 rect,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.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}
|