billboard.js 3.7.3 → 3.7.5
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 +67 -48
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +1761 -1335
- 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 +4 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +4 -3
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +4 -3
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +4 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1696 -1289
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1699 -1291
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +1700 -1292
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1701 -1293
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1702 -1294
- 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 -23
- 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 +21 -21
- package/src/ChartInternal/data/IData.ts +1 -1
- package/src/ChartInternal/data/data.ts +7 -7
- package/src/ChartInternal/interactions/eventrect.ts +4 -0
- package/src/ChartInternal/internals/redraw.ts +7 -7
- package/src/ChartInternal/shape/arc.ts +4 -2
- package/src/ChartInternal/shape/bar.ts +2 -3
- package/src/config/Options/data/axis.ts +10 -1
- package/src/module/util.ts +5 -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.7.
|
|
8
|
+
* @version 3.7.5
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -691,7 +691,8 @@ function getRandom(asStr, min, max) {
|
|
|
691
691
|
if (max === void 0) {
|
|
692
692
|
max = 1e4;
|
|
693
693
|
}
|
|
694
|
-
var
|
|
694
|
+
var crpt = win.crypto || win.msCrypto,
|
|
695
|
+
rand = crpt ? min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) : Math.floor(Math.random() * (max - min) + min);
|
|
695
696
|
return asStr ? rand + "" : rand;
|
|
696
697
|
}
|
|
697
698
|
|
|
@@ -4394,7 +4395,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
4394
4395
|
}.bind(this));
|
|
4395
4396
|
},
|
|
4396
4397
|
isMultipleX: function isMultipleX() {
|
|
4397
|
-
return notEmpty(this.config.data_xs) ||
|
|
4398
|
+
return notEmpty(this.config.data_xs) || this.hasType("bubble") || this.hasType("scatter");
|
|
4398
4399
|
},
|
|
4399
4400
|
addName: function addName(data) {
|
|
4400
4401
|
var $$ = this,
|
|
@@ -4618,11 +4619,12 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
4618
4619
|
}.bind(this))).map(function (v) {
|
|
4619
4620
|
_newArrowCheck(this, _this14);
|
|
4620
4621
|
return v.value;
|
|
4621
|
-
}.bind(this))
|
|
4622
|
+
}.bind(this));
|
|
4623
|
+
total = sum.length ? sum.reduce(function (p, c) {
|
|
4622
4624
|
_newArrowCheck(this, _this14);
|
|
4623
4625
|
return p + c;
|
|
4624
|
-
}.bind(this));
|
|
4625
|
-
$$.cache.add(cacheKey, total
|
|
4626
|
+
}.bind(this)) : 0;
|
|
4627
|
+
$$.cache.add(cacheKey, total);
|
|
4626
4628
|
}
|
|
4627
4629
|
if (subtractHidden) {
|
|
4628
4630
|
total -= $$.getHiddenTotalDataSum();
|
|
@@ -4697,7 +4699,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
4697
4699
|
};
|
|
4698
4700
|
}.bind(this));
|
|
4699
4701
|
} else if (length) {
|
|
4700
|
-
target = target[0].values;
|
|
4702
|
+
target = target[0].values.concat();
|
|
4701
4703
|
}
|
|
4702
4704
|
return target;
|
|
4703
4705
|
},
|
|
@@ -5305,7 +5307,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
5305
5307
|
*/
|
|
5306
5308
|
isBubbleZType: function isBubbleZType(d) {
|
|
5307
5309
|
var $$ = this;
|
|
5308
|
-
return $$.isBubbleType(d) && (isObject(d.value) && ("z" in d.value || "y" in d.value) || isArray(d.value) && d.value.length
|
|
5310
|
+
return $$.isBubbleType(d) && (isObject(d.value) && ("z" in d.value || "y" in d.value) || isArray(d.value) && d.value.length >= 2);
|
|
5309
5311
|
},
|
|
5310
5312
|
/**
|
|
5311
5313
|
* Determine if bar has ranged data
|
|
@@ -5317,7 +5319,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
5317
5319
|
var _this44 = this,
|
|
5318
5320
|
$$ = this,
|
|
5319
5321
|
value = d.value;
|
|
5320
|
-
return $$.isBarType(d) && isArray(value) && value.length
|
|
5322
|
+
return $$.isBarType(d) && isArray(value) && value.length >= 2 && value.every(function (v) {
|
|
5321
5323
|
_newArrowCheck(this, _this44);
|
|
5322
5324
|
return isNumber(v);
|
|
5323
5325
|
}.bind(this));
|
|
@@ -7382,14 +7384,14 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
7382
7384
|
$$.updateCircleY && ($$.circleY = $$.updateCircleY());
|
|
7383
7385
|
}
|
|
7384
7386
|
|
|
7387
|
+
// Data empty label positioning and text.
|
|
7388
|
+
config.data_empty_label_text && main.select("text." + $TEXT.text + "." + $COMMON.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null);
|
|
7389
|
+
|
|
7385
7390
|
// update axis
|
|
7386
7391
|
if (state.hasAxis) {
|
|
7387
7392
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
7388
7393
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
7389
7394
|
|
|
7390
|
-
// Data empty label positioning and text.
|
|
7391
|
-
config.data_empty_label_text && main.select("text." + $TEXT.text + "." + $COMMON.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null);
|
|
7392
|
-
|
|
7393
7395
|
// grid
|
|
7394
7396
|
$$.hasGrid() && $$.updateGrid();
|
|
7395
7397
|
|
|
@@ -14847,7 +14849,8 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14847
14849
|
* @private
|
|
14848
14850
|
*/
|
|
14849
14851
|
redrawEventRect: function redrawEventRect() {
|
|
14850
|
-
var
|
|
14852
|
+
var _this = this,
|
|
14853
|
+
$$ = this,
|
|
14851
14854
|
config = $$.config,
|
|
14852
14855
|
state = $$.state,
|
|
14853
14856
|
$el = $$.$el,
|
|
@@ -14872,6 +14875,12 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14872
14875
|
if (!isMultipleX) {
|
|
14873
14876
|
// Set data and update eventReceiver.data
|
|
14874
14877
|
var xAxisTickValues = $$.getMaxDataCountTarget();
|
|
14878
|
+
if (!config.data_xSort) {
|
|
14879
|
+
xAxisTickValues.sort(function (a, b) {
|
|
14880
|
+
_newArrowCheck(this, _this);
|
|
14881
|
+
return a.x - b.x;
|
|
14882
|
+
}.bind(this));
|
|
14883
|
+
}
|
|
14875
14884
|
|
|
14876
14885
|
// update data's index value to be alinged with the x Axis
|
|
14877
14886
|
$$.updateDataIndexByX(xAxisTickValues);
|
|
@@ -14882,7 +14891,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14882
14891
|
$$.updateEventRectData();
|
|
14883
14892
|
},
|
|
14884
14893
|
bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) {
|
|
14885
|
-
var
|
|
14894
|
+
var _this2 = this,
|
|
14886
14895
|
$$ = this,
|
|
14887
14896
|
config = $$.config,
|
|
14888
14897
|
state = $$.state,
|
|
@@ -14890,7 +14899,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14890
14899
|
eventRect = _$$$$el.eventRect,
|
|
14891
14900
|
svg = _$$$$el.svg,
|
|
14892
14901
|
selectRect = function (context) {
|
|
14893
|
-
_newArrowCheck(this,
|
|
14902
|
+
_newArrowCheck(this, _this2);
|
|
14894
14903
|
if (isMultipleX) {
|
|
14895
14904
|
$$.selectRectForMultipleXs(context);
|
|
14896
14905
|
} else {
|
|
@@ -14900,7 +14909,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14900
14909
|
}
|
|
14901
14910
|
}.bind(this),
|
|
14902
14911
|
unselectRect = function () {
|
|
14903
|
-
_newArrowCheck(this,
|
|
14912
|
+
_newArrowCheck(this, _this2);
|
|
14904
14913
|
$$.unselectRect();
|
|
14905
14914
|
$$.callOverOutForTouch();
|
|
14906
14915
|
}.bind(this),
|
|
@@ -14909,7 +14918,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14909
14918
|
preventThreshold = !isNaN(preventDefault) && preventDefault || null,
|
|
14910
14919
|
startPx,
|
|
14911
14920
|
preventEvent = function (event) {
|
|
14912
|
-
_newArrowCheck(this,
|
|
14921
|
+
_newArrowCheck(this, _this2);
|
|
14913
14922
|
var eventType = event.type,
|
|
14914
14923
|
touch = event.changedTouches[0],
|
|
14915
14924
|
currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")];
|
|
@@ -14930,11 +14939,11 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14930
14939
|
}.bind(this);
|
|
14931
14940
|
// bind touch events
|
|
14932
14941
|
eventRect.on("touchstart", function (event) {
|
|
14933
|
-
_newArrowCheck(this,
|
|
14942
|
+
_newArrowCheck(this, _this2);
|
|
14934
14943
|
state.event = event;
|
|
14935
14944
|
$$.updateEventRect();
|
|
14936
14945
|
}.bind(this)).on("touchstart.eventRect touchmove.eventRect", function (event) {
|
|
14937
|
-
_newArrowCheck(this,
|
|
14946
|
+
_newArrowCheck(this, _this2);
|
|
14938
14947
|
state.event = event;
|
|
14939
14948
|
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
14940
14949
|
// if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
|
|
@@ -14947,7 +14956,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14947
14956
|
unselectRect();
|
|
14948
14957
|
}
|
|
14949
14958
|
}.bind(this), !0).on("touchend.eventRect", function (event) {
|
|
14950
|
-
_newArrowCheck(this,
|
|
14959
|
+
_newArrowCheck(this, _this2);
|
|
14951
14960
|
state.event = event;
|
|
14952
14961
|
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
14953
14962
|
if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
|
|
@@ -14956,7 +14965,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14956
14965
|
}
|
|
14957
14966
|
}.bind(this), !0);
|
|
14958
14967
|
svg.on("touchstart", function (event) {
|
|
14959
|
-
_newArrowCheck(this,
|
|
14968
|
+
_newArrowCheck(this, _this2);
|
|
14960
14969
|
state.event = event;
|
|
14961
14970
|
var target = event.target;
|
|
14962
14971
|
if (target && target !== eventRect.node()) {
|
|
@@ -14971,7 +14980,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14971
14980
|
* @private
|
|
14972
14981
|
*/
|
|
14973
14982
|
updateEventRect: function updateEventRect(eventRect, force) {
|
|
14974
|
-
var
|
|
14983
|
+
var _this3 = this;
|
|
14975
14984
|
if (force === void 0) {
|
|
14976
14985
|
force = !1;
|
|
14977
14986
|
}
|
|
@@ -14986,7 +14995,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14986
14995
|
resizing = _state.resizing,
|
|
14987
14996
|
rectElement = eventRect || $el.eventRect,
|
|
14988
14997
|
updateClientRect = function () {
|
|
14989
|
-
_newArrowCheck(this,
|
|
14998
|
+
_newArrowCheck(this, _this3);
|
|
14990
14999
|
eventReceiver && (eventReceiver.rect = rectElement.node().getBoundingClientRect());
|
|
14991
15000
|
}.bind(this);
|
|
14992
15001
|
if (!rendered || resizing || force) {
|
|
@@ -15004,7 +15013,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15004
15013
|
* @private
|
|
15005
15014
|
*/
|
|
15006
15015
|
updateEventRectData: function updateEventRectData() {
|
|
15007
|
-
var
|
|
15016
|
+
var _this4 = this,
|
|
15008
15017
|
$$ = this,
|
|
15009
15018
|
config = $$.config,
|
|
15010
15019
|
scale = $$.scale,
|
|
@@ -15026,21 +15035,21 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15026
15035
|
if ($$.axis.isCategorized()) {
|
|
15027
15036
|
rectW = $$.getEventRectWidth();
|
|
15028
15037
|
rectX = function (d) {
|
|
15029
|
-
_newArrowCheck(this,
|
|
15038
|
+
_newArrowCheck(this, _this4);
|
|
15030
15039
|
return xScale(d.x) - rectW / 2;
|
|
15031
15040
|
}.bind(this);
|
|
15032
15041
|
} else {
|
|
15033
15042
|
var getPrevNextX = function (_ref) {
|
|
15034
15043
|
var index = _ref.index;
|
|
15035
|
-
_newArrowCheck(this,
|
|
15044
|
+
_newArrowCheck(this, _this4);
|
|
15036
15045
|
return {
|
|
15037
15046
|
prev: $$.getPrevX(index),
|
|
15038
15047
|
next: $$.getNextX(index)
|
|
15039
15048
|
};
|
|
15040
15049
|
}.bind(this);
|
|
15041
15050
|
rectW = function (d) {
|
|
15042
|
-
var
|
|
15043
|
-
_newArrowCheck(this,
|
|
15051
|
+
var _this5 = this;
|
|
15052
|
+
_newArrowCheck(this, _this4);
|
|
15044
15053
|
var x = getPrevNextX(d),
|
|
15045
15054
|
xDomain = xScale.domain();
|
|
15046
15055
|
var val;
|
|
@@ -15055,7 +15064,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15055
15064
|
} else {
|
|
15056
15065
|
Object.keys(x).forEach(function (key, i) {
|
|
15057
15066
|
var _x$key;
|
|
15058
|
-
_newArrowCheck(this,
|
|
15067
|
+
_newArrowCheck(this, _this5);
|
|
15059
15068
|
x[key] = (_x$key = x[key]) != null ? _x$key : xDomain[i];
|
|
15060
15069
|
}.bind(this));
|
|
15061
15070
|
val = Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2);
|
|
@@ -15063,7 +15072,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15063
15072
|
return val;
|
|
15064
15073
|
}.bind(this);
|
|
15065
15074
|
rectX = function (d) {
|
|
15066
|
-
_newArrowCheck(this,
|
|
15075
|
+
_newArrowCheck(this, _this4);
|
|
15067
15076
|
var x = getPrevNextX(d);
|
|
15068
15077
|
var val;
|
|
15069
15078
|
|
|
@@ -15085,13 +15094,13 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15085
15094
|
}
|
|
15086
15095
|
var eventReceiver = state.eventReceiver,
|
|
15087
15096
|
call = function (fn, v) {
|
|
15088
|
-
_newArrowCheck(this,
|
|
15097
|
+
_newArrowCheck(this, _this4);
|
|
15089
15098
|
return isFunction(fn) ? fn(v) : fn;
|
|
15090
15099
|
}.bind(this);
|
|
15091
15100
|
// reset for possible remains coords data before the data loading
|
|
15092
15101
|
eventReceiver.coords.splice(eventReceiver.data.length);
|
|
15093
15102
|
eventReceiver.data.forEach(function (d, i) {
|
|
15094
|
-
_newArrowCheck(this,
|
|
15103
|
+
_newArrowCheck(this, _this4);
|
|
15095
15104
|
eventReceiver.coords[i] = {
|
|
15096
15105
|
x: call(x, d),
|
|
15097
15106
|
y: call(y, d),
|
|
@@ -15101,7 +15110,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15101
15110
|
}.bind(this));
|
|
15102
15111
|
},
|
|
15103
15112
|
selectRectForMultipleXs: function selectRectForMultipleXs(context) {
|
|
15104
|
-
var
|
|
15113
|
+
var _this6 = this,
|
|
15105
15114
|
$$ = this,
|
|
15106
15115
|
config = $$.config,
|
|
15107
15116
|
state = $$.state,
|
|
@@ -15122,7 +15131,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15122
15131
|
}
|
|
15123
15132
|
var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x),
|
|
15124
15133
|
selectedData = sameXData.map(function (d) {
|
|
15125
|
-
_newArrowCheck(this,
|
|
15134
|
+
_newArrowCheck(this, _this6);
|
|
15126
15135
|
return $$.addName(d);
|
|
15127
15136
|
}.bind(this)); // show tooltip when cursor is close to some point
|
|
15128
15137
|
$$.showTooltip(selectedData, context);
|
|
@@ -15169,7 +15178,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15169
15178
|
* @private
|
|
15170
15179
|
*/
|
|
15171
15180
|
generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {
|
|
15172
|
-
var
|
|
15181
|
+
var _this7 = this,
|
|
15173
15182
|
$$ = this,
|
|
15174
15183
|
config = $$.config,
|
|
15175
15184
|
state = $$.state,
|
|
@@ -15183,12 +15192,12 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15183
15192
|
});
|
|
15184
15193
|
if (state.inputType === "mouse") {
|
|
15185
15194
|
var getData = function (event) {
|
|
15186
|
-
_newArrowCheck(this,
|
|
15195
|
+
_newArrowCheck(this, _this7);
|
|
15187
15196
|
var index = event ? $$.getDataIndexFromEvent(event) : eventReceiver.currentIdx;
|
|
15188
15197
|
return index > -1 ? eventReceiver.data[index] : null;
|
|
15189
15198
|
}.bind(this);
|
|
15190
15199
|
rect.on("mouseover", function (event) {
|
|
15191
|
-
_newArrowCheck(this,
|
|
15200
|
+
_newArrowCheck(this, _this7);
|
|
15192
15201
|
state.event = event;
|
|
15193
15202
|
$$.updateEventRect();
|
|
15194
15203
|
}.bind(this)).on("mousemove", function (event) {
|
|
@@ -15226,7 +15235,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15226
15235
|
// to determine current interacting element, so use 'mousemove' event instead.
|
|
15227
15236
|
$$.setOverOut(index !== -1, index);
|
|
15228
15237
|
}).on("mouseout", function (event) {
|
|
15229
|
-
_newArrowCheck(this,
|
|
15238
|
+
_newArrowCheck(this, _this7);
|
|
15230
15239
|
state.event = event;
|
|
15231
15240
|
|
|
15232
15241
|
// chart is destroyed
|
|
@@ -15266,7 +15275,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15266
15275
|
* @private
|
|
15267
15276
|
*/
|
|
15268
15277
|
generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {
|
|
15269
|
-
var
|
|
15278
|
+
var _this8 = this,
|
|
15270
15279
|
$$ = this,
|
|
15271
15280
|
state = $$.state;
|
|
15272
15281
|
eventRectEnter.on("click", function (event) {
|
|
@@ -15278,7 +15287,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
15278
15287
|
state.event = event;
|
|
15279
15288
|
$$.selectRectForMultipleXs(this);
|
|
15280
15289
|
}).on("mouseout", function (event) {
|
|
15281
|
-
_newArrowCheck(this,
|
|
15290
|
+
_newArrowCheck(this, _this8);
|
|
15282
15291
|
state.event = event;
|
|
15283
15292
|
|
|
15284
15293
|
// chart is destroyed
|
|
@@ -16397,13 +16406,22 @@ function smoothLines(el, type) {
|
|
|
16397
16406
|
data_xLocaltime: !0,
|
|
16398
16407
|
/**
|
|
16399
16408
|
* Sort on x axis.
|
|
16409
|
+
* - **NOTE:** This option works for lineish(area/line/spline/step) types only.
|
|
16400
16410
|
* @name data․xSort
|
|
16401
16411
|
* @memberof Options
|
|
16402
16412
|
* @type {boolean}
|
|
16403
16413
|
* @default true
|
|
16414
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)
|
|
16404
16415
|
* @example
|
|
16405
16416
|
* data: {
|
|
16406
|
-
* xSort: false
|
|
16417
|
+
* xSort: false,
|
|
16418
|
+
* x: "x",
|
|
16419
|
+
* columns: [
|
|
16420
|
+
* // The line graph will start to be drawn following the x axis sequence
|
|
16421
|
+
* // Below data, wil start drawing x=1: 200, x=2: 300, x=3: 100
|
|
16422
|
+
* ["x", 3, 1, 2],
|
|
16423
|
+
* ["data1", 100, 200, 300]
|
|
16424
|
+
* ]
|
|
16407
16425
|
* }
|
|
16408
16426
|
*/
|
|
16409
16427
|
data_xSort: !0,
|
|
@@ -18826,6 +18844,7 @@ function getAttrTweenFn(fn) {
|
|
|
18826
18844
|
state = $$.state,
|
|
18827
18845
|
hasMultiArcGauge = $$.hasMultiArcGauge(),
|
|
18828
18846
|
isFullCircle = config.gauge_fullCircle,
|
|
18847
|
+
showEmptyTextLabel = $$.filterTargetsToShow($$.data.targets).length === 0 && !!config.data_empty_label_text,
|
|
18829
18848
|
startAngle = $$.getStartAngle(),
|
|
18830
18849
|
endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1,
|
|
18831
18850
|
backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + $ARC.chartArcsBackground);
|
|
@@ -18838,7 +18857,7 @@ function getAttrTweenFn(fn) {
|
|
|
18838
18857
|
}.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
|
|
18839
18858
|
var id = _ref2.id;
|
|
18840
18859
|
_newArrowCheck(this, _this14);
|
|
18841
|
-
if (state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
18860
|
+
if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
18842
18861
|
return "M 0 0";
|
|
18843
18862
|
}
|
|
18844
18863
|
var d = {
|
|
@@ -18853,7 +18872,7 @@ function getAttrTweenFn(fn) {
|
|
|
18853
18872
|
}.bind(this));
|
|
18854
18873
|
backgroundArc.exit().remove();
|
|
18855
18874
|
} else {
|
|
18856
|
-
backgroundArc.attr("d", function () {
|
|
18875
|
+
backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : function () {
|
|
18857
18876
|
_newArrowCheck(this, _this14);
|
|
18858
18877
|
var d = {
|
|
18859
18878
|
data: [{
|
|
@@ -19318,11 +19337,11 @@ function getAttrTweenFn(fn) {
|
|
|
19318
19337
|
pathRadius = ["", ""]; // switch points if axis is rotated, not applicable for sub chart
|
|
19319
19338
|
var radius = 0;
|
|
19320
19339
|
var isGrouped = $$.isGrouped(d.id),
|
|
19321
|
-
isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : !1;
|
|
19322
|
-
if (getRadius
|
|
19340
|
+
isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : !1;
|
|
19341
|
+
if (getRadius) {
|
|
19323
19342
|
var index = isRotated ? indexY : indexX,
|
|
19324
19343
|
barW = points[2][index] - points[0][index];
|
|
19325
|
-
radius = getRadius(barW);
|
|
19344
|
+
radius = !isGrouped || isRadiusData ? getRadius(barW) : 0;
|
|
19326
19345
|
var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " ";
|
|
19327
19346
|
pathRadius[+!isRotated] = "" + arc + radius + "," + radius;
|
|
19328
19347
|
pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"]();
|
|
@@ -24504,7 +24523,7 @@ var _defaults = {};
|
|
|
24504
24523
|
|
|
24505
24524
|
/**
|
|
24506
24525
|
* @namespace bb
|
|
24507
|
-
* @version 3.7.
|
|
24526
|
+
* @version 3.7.5
|
|
24508
24527
|
*/
|
|
24509
24528
|
var bb = {
|
|
24510
24529
|
/**
|
|
@@ -24514,7 +24533,7 @@ var bb = {
|
|
|
24514
24533
|
* bb.version; // "1.0.0"
|
|
24515
24534
|
* @memberof bb
|
|
24516
24535
|
*/
|
|
24517
|
-
version: "3.7.
|
|
24536
|
+
version: "3.7.5",
|
|
24518
24537
|
/**
|
|
24519
24538
|
* Generate chart
|
|
24520
24539
|
* - **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.7.
|
|
8
|
+
* @version 3.7.5
|
|
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-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;-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}
|