billboard.js 3.11.2 → 3.11.3
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/README.md +1 -1
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +29 -16
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +29 -16
- 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 +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 +21 -20
- 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 +17 -17
- package/src/ChartInternal/data/IData.ts +2 -2
- package/src/ChartInternal/internals/clip.ts +1 -6
- package/src/ChartInternal/internals/legend.ts +6 -5
- package/src/ChartInternal/internals/tooltip.ts +10 -6
- package/src/config/Options/common/legend.ts +1 -1
package/dist/billboard.pkgd.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.3
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.0
|
|
@@ -26574,7 +26574,7 @@ var data_this = undefined;
|
|
|
26574
26574
|
* - rectangle
|
|
26575
26575
|
* @property {boolean} [legend.format] Set formatter function for legend text.
|
|
26576
26576
|
* The argument:<br>
|
|
26577
|
-
* - `id`: legend text
|
|
26577
|
+
* - `id`: legend text value. When `data.names` is specified, will pass from it, otherwise will pass data id.
|
|
26578
26578
|
* @property {boolean} [legend.tooltip=false] Show full legend text value using system tooltip(via `<title>` element).
|
|
26579
26579
|
* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
|
|
26580
26580
|
* @see [Demo: format](https://naver.github.io/billboard.js/demo/#Legend.LegendFormat)
|
|
@@ -30957,13 +30957,17 @@ function getLegendColor(id) {
|
|
|
30957
30957
|
/**
|
|
30958
30958
|
* Get formatted text value
|
|
30959
30959
|
* @param {string} id Legend text id
|
|
30960
|
+
* @param {boolean} formatted Whether or not to format the text
|
|
30960
30961
|
* @returns {string} Formatted legend text
|
|
30961
30962
|
*/
|
|
30962
|
-
function getFormattedText(id) {
|
|
30963
|
+
function getFormattedText(id, formatted) {
|
|
30963
30964
|
var _config$data_names$id;
|
|
30965
|
+
if (formatted === void 0) {
|
|
30966
|
+
formatted = !0;
|
|
30967
|
+
}
|
|
30964
30968
|
const config = this.config;
|
|
30965
30969
|
let text = (_config$data_names$id = config.data_names[id]) != null ? _config$data_names$id : id;
|
|
30966
|
-
if (isFunction(config.legend_format)) {
|
|
30970
|
+
if (formatted && isFunction(config.legend_format)) {
|
|
30967
30971
|
text = config.legend_format(text);
|
|
30968
30972
|
}
|
|
30969
30973
|
return text;
|
|
@@ -31468,10 +31472,13 @@ function getFormattedText(id) {
|
|
|
31468
31472
|
if (config.legend_tooltip) {
|
|
31469
31473
|
legend.selectAll("title").data(targetIdz).text(function (id) {
|
|
31470
31474
|
_newArrowCheck(this, _this4);
|
|
31471
|
-
return id;
|
|
31475
|
+
return getFormattedText.bind($$)(id, !1);
|
|
31472
31476
|
}.bind(this));
|
|
31473
31477
|
}
|
|
31474
|
-
const texts = legend.selectAll("text").data(targetIdz).text(
|
|
31478
|
+
const texts = legend.selectAll("text").data(targetIdz).text(function (id) {
|
|
31479
|
+
_newArrowCheck(this, _this4);
|
|
31480
|
+
return getFormattedText.bind($$)(id);
|
|
31481
|
+
}.bind(this)) // MEMO: needed for update
|
|
31475
31482
|
.each(function (id, i) {
|
|
31476
31483
|
updatePositions(this, id, i);
|
|
31477
31484
|
});
|
|
@@ -31612,7 +31619,10 @@ function getFormattedText(id) {
|
|
|
31612
31619
|
return id;
|
|
31613
31620
|
}.bind(this));
|
|
31614
31621
|
}
|
|
31615
|
-
l.append("text").text(
|
|
31622
|
+
l.append("text").text(function (id) {
|
|
31623
|
+
_newArrowCheck(this, _this6);
|
|
31624
|
+
return getFormattedText.bind($$)(id);
|
|
31625
|
+
}.bind(this)).each(function (id, i) {
|
|
31616
31626
|
updatePositions(this, id, i);
|
|
31617
31627
|
}).style("pointer-events", $$.getStylePropValue("none")).attr("x", isLegendRightOrInset ? posFn.xText : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yText);
|
|
31618
31628
|
l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", $$.getStylePropValue("0")).attr("x", isLegendRightOrInset ? posFn.xRect : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yRect);
|
|
@@ -36246,11 +36256,11 @@ function getTextXPos(pos, width) {
|
|
|
36246
36256
|
width = _state.width,
|
|
36247
36257
|
height = _state.height,
|
|
36248
36258
|
current = _state.current,
|
|
36259
|
+
hasRadar = _state.hasRadar,
|
|
36260
|
+
hasTreemap = _state.hasTreemap,
|
|
36249
36261
|
isLegendRight = _state.isLegendRight,
|
|
36250
36262
|
inputType = _state.inputType,
|
|
36251
36263
|
hasGauge = $$.hasType("gauge") && !config.gauge_fullCircle,
|
|
36252
|
-
hasTreemap = state.hasTreemap,
|
|
36253
|
-
hasRadar = state.hasRadar,
|
|
36254
36264
|
isRotated = config.axis_rotated,
|
|
36255
36265
|
hasArcType = $$.hasArcType(),
|
|
36256
36266
|
svgLeft = $$.getSvgLeft(!0);
|
|
@@ -36264,10 +36274,14 @@ function getTextXPos(pos, width) {
|
|
|
36264
36274
|
x += x >= width / 2 ? 15 : -(tWidth + 15);
|
|
36265
36275
|
y += 15;
|
|
36266
36276
|
} else if (hasArcType) {
|
|
36267
|
-
if (
|
|
36268
|
-
var _$$$getTitlePadding;
|
|
36277
|
+
if (inputType !== "touch") {
|
|
36278
|
+
var _$$$getTitlePadding, _config$arc_rangeText;
|
|
36279
|
+
let titlePadding = (_$$$getTitlePadding = $$.getTitlePadding == null ? void 0 : $$.getTitlePadding()) != null ? _$$$getTitlePadding : 0;
|
|
36280
|
+
if (titlePadding && hasGauge && (_config$arc_rangeText = config.arc_rangeText_values) != null && _config$arc_rangeText.length) {
|
|
36281
|
+
titlePadding += 10;
|
|
36282
|
+
}
|
|
36269
36283
|
x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
|
|
36270
|
-
y += (hasGauge ? height : height / 2 + tHeight) +
|
|
36284
|
+
y += (hasGauge ? height : height / 2 + tHeight) + titlePadding;
|
|
36271
36285
|
}
|
|
36272
36286
|
} else if (hasTreemap) {
|
|
36273
36287
|
y += tHeight;
|
|
@@ -42638,8 +42652,7 @@ const src_linear_linear = function (t) {
|
|
|
42638
42652
|
if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) {
|
|
42639
42653
|
return null;
|
|
42640
42654
|
}
|
|
42641
|
-
|
|
42642
|
-
return "url(" + (isIE9 ? "" : browser_doc.URL.split("#")[0]) + "#" + id + ")";
|
|
42655
|
+
return "url(#" + id + ")";
|
|
42643
42656
|
},
|
|
42644
42657
|
appendClip: function appendClip(parent, id) {
|
|
42645
42658
|
id && parent.append("clipPath").attr("id", id).append("rect");
|
|
@@ -54101,7 +54114,7 @@ let _defaults = {};
|
|
|
54101
54114
|
|
|
54102
54115
|
/**
|
|
54103
54116
|
* @namespace bb
|
|
54104
|
-
* @version 3.11.
|
|
54117
|
+
* @version 3.11.3
|
|
54105
54118
|
*/
|
|
54106
54119
|
const bb = {
|
|
54107
54120
|
/**
|
|
@@ -54111,7 +54124,7 @@ const bb = {
|
|
|
54111
54124
|
* bb.version; // "1.0.0"
|
|
54112
54125
|
* @memberof bb
|
|
54113
54126
|
*/
|
|
54114
|
-
version: "3.11.
|
|
54127
|
+
version: "3.11.3",
|
|
54115
54128
|
/**
|
|
54116
54129
|
* Generate chart
|
|
54117
54130
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|