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/theme/datalab.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-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;font-size:11px;line-height:1}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-font-smoothing:antialiased;fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis{stroke-width:.7px}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:.7px}.bb-circle{fill:#fff!important}.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:1px}.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;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;stroke-dasharray:1 20;transform:translate(7px,1px)}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{-webkit-font-smoothing:antialiased;background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{background-color:#0b00b1;border-bottom:2px solid #ff2d2d;color:#fffdfd;font-size:13px;padding:2px 8px;text-align:left}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.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:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.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:.7px}.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;padding:5px}
|
package/dist/theme/graph.css
CHANGED
package/dist/theme/graph.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-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.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;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.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-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.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;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px}
|
package/dist/theme/insight.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-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.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;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.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:none}.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-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.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-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;padding:5px}
|
package/dist-esm/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
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
11
11
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
@@ -405,7 +405,10 @@ function getRandom(asStr, min, max) {
|
|
|
405
405
|
if (asStr === void 0) { asStr = true; }
|
|
406
406
|
if (min === void 0) { min = 0; }
|
|
407
407
|
if (max === void 0) { max = 10000; }
|
|
408
|
-
var
|
|
408
|
+
var crpt = win.crypto || win.msCrypto;
|
|
409
|
+
var rand = crpt ?
|
|
410
|
+
min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) :
|
|
411
|
+
Math.floor(Math.random() * (max - min) + min);
|
|
409
412
|
return asStr ? String(rand) : rand;
|
|
410
413
|
}
|
|
411
414
|
/**
|
|
@@ -3766,7 +3769,6 @@ var data$1 = {
|
|
|
3766
3769
|
},
|
|
3767
3770
|
isMultipleX: function () {
|
|
3768
3771
|
return notEmpty(this.config.data_xs) ||
|
|
3769
|
-
!this.config.data_xSort ||
|
|
3770
3772
|
this.hasType("bubble") ||
|
|
3771
3773
|
this.hasType("scatter");
|
|
3772
3774
|
},
|
|
@@ -3945,9 +3947,9 @@ var data$1 = {
|
|
|
3945
3947
|
var total = $$.cache.get(cacheKey);
|
|
3946
3948
|
if (!isNumber(total)) {
|
|
3947
3949
|
var sum = mergeArray($$.data.targets.map(function (t) { return t.values; }))
|
|
3948
|
-
.map(function (v) { return v.value; })
|
|
3949
|
-
|
|
3950
|
-
$$.cache.add(cacheKey, total
|
|
3950
|
+
.map(function (v) { return v.value; });
|
|
3951
|
+
total = sum.length ? sum.reduce(function (p, c) { return p + c; }) : 0;
|
|
3952
|
+
$$.cache.add(cacheKey, total);
|
|
3951
3953
|
}
|
|
3952
3954
|
if (subtractHidden) {
|
|
3953
3955
|
total -= $$.getHiddenTotalDataSum();
|
|
@@ -3999,7 +4001,7 @@ var data$1 = {
|
|
|
3999
4001
|
.map(function (x, index) { return ({ x: x, index: index }); });
|
|
4000
4002
|
}
|
|
4001
4003
|
else if (length) {
|
|
4002
|
-
target = target[0].values;
|
|
4004
|
+
target = target[0].values.concat();
|
|
4003
4005
|
}
|
|
4004
4006
|
return target;
|
|
4005
4007
|
},
|
|
@@ -4487,7 +4489,7 @@ var data$1 = {
|
|
|
4487
4489
|
isBubbleZType: function (d) {
|
|
4488
4490
|
var $$ = this;
|
|
4489
4491
|
return $$.isBubbleType(d) && ((isObject(d.value) && ("z" in d.value || "y" in d.value)) ||
|
|
4490
|
-
(isArray(d.value) && d.value.length
|
|
4492
|
+
(isArray(d.value) && d.value.length >= 2));
|
|
4491
4493
|
},
|
|
4492
4494
|
/**
|
|
4493
4495
|
* Determine if bar has ranged data
|
|
@@ -4498,7 +4500,7 @@ var data$1 = {
|
|
|
4498
4500
|
isBarRangeType: function (d) {
|
|
4499
4501
|
var $$ = this;
|
|
4500
4502
|
var value = d.value;
|
|
4501
|
-
return $$.isBarType(d) && isArray(value) && value.length
|
|
4503
|
+
return $$.isBarType(d) && isArray(value) && value.length >= 2 && value.every(function (v) { return isNumber(v); });
|
|
4502
4504
|
},
|
|
4503
4505
|
/**
|
|
4504
4506
|
* Get data object by id
|
|
@@ -6350,16 +6352,16 @@ var redraw = {
|
|
|
6350
6352
|
if (!treemap && (!$$.hasArcType() || state.hasRadar)) {
|
|
6351
6353
|
$$.updateCircleY && ($$.circleY = $$.updateCircleY());
|
|
6352
6354
|
}
|
|
6355
|
+
// Data empty label positioning and text.
|
|
6356
|
+
config.data_empty_label_text && main.select("text.".concat($TEXT.text, ".").concat($COMMON.empty))
|
|
6357
|
+
.attr("x", state.width / 2)
|
|
6358
|
+
.attr("y", state.height / 2)
|
|
6359
|
+
.text(config.data_empty_label_text)
|
|
6360
|
+
.style("display", targetsToShow.length ? "none" : null);
|
|
6353
6361
|
// update axis
|
|
6354
6362
|
if (state.hasAxis) {
|
|
6355
6363
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
6356
6364
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
6357
|
-
// Data empty label positioning and text.
|
|
6358
|
-
config.data_empty_label_text && main.select("text.".concat($TEXT.text, ".").concat($COMMON.empty))
|
|
6359
|
-
.attr("x", state.width / 2)
|
|
6360
|
-
.attr("y", state.height / 2)
|
|
6361
|
-
.text(config.data_empty_label_text)
|
|
6362
|
-
.style("display", targetsToShow.length ? "none" : null);
|
|
6363
6365
|
// grid
|
|
6364
6366
|
$$.hasGrid() && $$.updateGrid();
|
|
6365
6367
|
// rect for regions
|
|
@@ -13158,6 +13160,9 @@ var eventrect = {
|
|
|
13158
13160
|
if (!isMultipleX) {
|
|
13159
13161
|
// Set data and update eventReceiver.data
|
|
13160
13162
|
var xAxisTickValues = $$.getMaxDataCountTarget();
|
|
13163
|
+
if (!config.data_xSort) {
|
|
13164
|
+
xAxisTickValues.sort(function (a, b) { return a.x - b.x; });
|
|
13165
|
+
}
|
|
13161
13166
|
// update data's index value to be alinged with the x Axis
|
|
13162
13167
|
$$.updateDataIndexByX(xAxisTickValues);
|
|
13163
13168
|
$$.updateXs(xAxisTickValues);
|
|
@@ -14614,13 +14619,22 @@ var optDataAxis = {
|
|
|
14614
14619
|
data_xLocaltime: true,
|
|
14615
14620
|
/**
|
|
14616
14621
|
* Sort on x axis.
|
|
14622
|
+
* - **NOTE:** This option works for lineish(area/line/spline/step) types only.
|
|
14617
14623
|
* @name data․xSort
|
|
14618
14624
|
* @memberof Options
|
|
14619
14625
|
* @type {boolean}
|
|
14620
14626
|
* @default true
|
|
14627
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)
|
|
14621
14628
|
* @example
|
|
14622
14629
|
* data: {
|
|
14623
|
-
* xSort: false
|
|
14630
|
+
* xSort: false,
|
|
14631
|
+
* x: "x",
|
|
14632
|
+
* columns: [
|
|
14633
|
+
* // The line graph will start to be drawn following the x axis sequence
|
|
14634
|
+
* // Below data, wil start drawing x=1: 200, x=2: 300, x=3: 100
|
|
14635
|
+
* ["x", 3, 1, 2],
|
|
14636
|
+
* ["data1", 100, 200, 300]
|
|
14637
|
+
* ]
|
|
14624
14638
|
* }
|
|
14625
14639
|
*/
|
|
14626
14640
|
data_xSort: true,
|
|
@@ -17004,6 +17018,8 @@ var shapeArc = {
|
|
|
17004
17018
|
var config = $$.config, state = $$.state;
|
|
17005
17019
|
var hasMultiArcGauge = $$.hasMultiArcGauge();
|
|
17006
17020
|
var isFullCircle = config.gauge_fullCircle;
|
|
17021
|
+
var showEmptyTextLabel = $$.filterTargetsToShow($$.data.targets).length === 0 &&
|
|
17022
|
+
!!config.data_empty_label_text;
|
|
17007
17023
|
var startAngle = $$.getStartAngle();
|
|
17008
17024
|
var endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
|
|
17009
17025
|
var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat($ARC.chartArcsBackground));
|
|
@@ -17019,7 +17035,7 @@ var shapeArc = {
|
|
|
17019
17035
|
.style("fill", (config.gauge_background) || null)
|
|
17020
17036
|
.attr("d", function (_a) {
|
|
17021
17037
|
var id = _a.id;
|
|
17022
|
-
if (state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
17038
|
+
if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
17023
17039
|
return "M 0 0";
|
|
17024
17040
|
}
|
|
17025
17041
|
var d = {
|
|
@@ -17033,7 +17049,7 @@ var shapeArc = {
|
|
|
17033
17049
|
backgroundArc.exit().remove();
|
|
17034
17050
|
}
|
|
17035
17051
|
else {
|
|
17036
|
-
backgroundArc.attr("d", function () {
|
|
17052
|
+
backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : function () {
|
|
17037
17053
|
var d = {
|
|
17038
17054
|
data: [{ value: config.gauge_max }],
|
|
17039
17055
|
startAngle: startAngle,
|
|
@@ -17471,12 +17487,11 @@ var shapeBar = {
|
|
|
17471
17487
|
var pathRadius = ["", ""];
|
|
17472
17488
|
var radius = 0;
|
|
17473
17489
|
var isGrouped = $$.isGrouped(d.id);
|
|
17474
|
-
// const hasRadius = d.value !== 0 && getRadius;
|
|
17475
17490
|
var isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : false;
|
|
17476
|
-
if (getRadius
|
|
17491
|
+
if (getRadius) {
|
|
17477
17492
|
var index = isRotated ? indexY : indexX;
|
|
17478
17493
|
var barW = points[2][index] - points[0][index];
|
|
17479
|
-
radius = getRadius(barW);
|
|
17494
|
+
radius = !isGrouped || isRadiusData ? getRadius(barW) : 0;
|
|
17480
17495
|
var arc = "a".concat(radius, ",").concat(radius, " ").concat(isNegative ? "1 0 0" : "0 0 1", " ");
|
|
17481
17496
|
pathRadius[+!isRotated] = "".concat(arc).concat(radius, ",").concat(radius);
|
|
17482
17497
|
pathRadius[+isRotated] = "".concat(arc).concat([-radius, radius][isRotated ? "sort" : "reverse"]());
|
|
@@ -22114,7 +22129,7 @@ var zoomModule = function () {
|
|
|
22114
22129
|
var defaults = {};
|
|
22115
22130
|
/**
|
|
22116
22131
|
* @namespace bb
|
|
22117
|
-
* @version 3.7.
|
|
22132
|
+
* @version 3.7.5
|
|
22118
22133
|
*/
|
|
22119
22134
|
var bb = {
|
|
22120
22135
|
/**
|
|
@@ -22124,7 +22139,7 @@ var bb = {
|
|
|
22124
22139
|
* bb.version; // "1.0.0"
|
|
22125
22140
|
* @memberof bb
|
|
22126
22141
|
*/
|
|
22127
|
-
version: "3.7.
|
|
22142
|
+
version: "3.7.5",
|
|
22128
22143
|
/**
|
|
22129
22144
|
* Generate chart
|
|
22130
22145
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
|
@@ -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
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
|
|
|
104
104
|
delete _this[key];
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
-
Plugin.version = "3.7.
|
|
107
|
+
Plugin.version = "3.7.5";
|
|
108
108
|
return Plugin;
|
|
109
109
|
}());
|
|
110
110
|
var Plugin$1 = Plugin;
|
|
@@ -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
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -278,7 +278,7 @@ var Plugin = /** @class */ (function () {
|
|
|
278
278
|
delete _this[key];
|
|
279
279
|
});
|
|
280
280
|
};
|
|
281
|
-
Plugin.version = "3.7.
|
|
281
|
+
Plugin.version = "3.7.5";
|
|
282
282
|
return Plugin;
|
|
283
283
|
}());
|
|
284
284
|
var Plugin$1 = Plugin;
|
|
@@ -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
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -486,7 +486,7 @@ var Plugin = /** @class */ (function () {
|
|
|
486
486
|
delete _this[key];
|
|
487
487
|
});
|
|
488
488
|
};
|
|
489
|
-
Plugin.version = "3.7.
|
|
489
|
+
Plugin.version = "3.7.5";
|
|
490
490
|
return Plugin;
|
|
491
491
|
}());
|
|
492
492
|
var Plugin$1 = Plugin;
|
|
@@ -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
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () {
|
|
|
121
121
|
delete _this[key];
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
Plugin.version = "3.7.
|
|
124
|
+
Plugin.version = "3.7.5";
|
|
125
125
|
return Plugin;
|
|
126
126
|
}());
|
|
127
127
|
var Plugin$1 = Plugin;
|
|
@@ -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
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -263,7 +263,7 @@ var Plugin = /** @class */ (function () {
|
|
|
263
263
|
delete _this[key];
|
|
264
264
|
});
|
|
265
265
|
};
|
|
266
|
-
Plugin.version = "3.7.
|
|
266
|
+
Plugin.version = "3.7.5";
|
|
267
267
|
return Plugin;
|
|
268
268
|
}());
|
|
269
269
|
var Plugin$1 = Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.5",
|
|
4
4
|
"description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
|
|
5
5
|
"homepage": "https://naver.github.io/billboard.js/",
|
|
6
6
|
"main": "dist/billboard.js",
|
|
@@ -101,16 +101,16 @@
|
|
|
101
101
|
"d3-zoom": "^3.0.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@babel/core": "^7.
|
|
104
|
+
"@babel/core": "^7.21.0",
|
|
105
105
|
"@babel/eslint-parser": "^7.19.1",
|
|
106
106
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
107
107
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
108
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
108
|
+
"@babel/plugin-transform-runtime": "^7.21.0",
|
|
109
109
|
"@babel/preset-env": "^7.20.2",
|
|
110
|
-
"@babel/preset-typescript": "^7.
|
|
111
|
-
"@babel/runtime": "^7.
|
|
112
|
-
"@commitlint/cli": "17.4.
|
|
113
|
-
"@commitlint/config-conventional": "^17.4.
|
|
110
|
+
"@babel/preset-typescript": "^7.21.0",
|
|
111
|
+
"@babel/runtime": "^7.21.0",
|
|
112
|
+
"@commitlint/cli": "17.4.4",
|
|
113
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
114
114
|
"@rollup/plugin-babel": "^6.0.3",
|
|
115
115
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
116
116
|
"@rollup/plugin-replace": "^5.0.2",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"@types/d3": "^7.4.0",
|
|
126
126
|
"@types/mocha": "^10.0.1",
|
|
127
127
|
"@types/sinon": "^10.0.13",
|
|
128
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
129
|
-
"@typescript-eslint/parser": "^5.
|
|
128
|
+
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
129
|
+
"@typescript-eslint/parser": "^5.54.0",
|
|
130
130
|
"babel-helper-modules": "^6.0.0",
|
|
131
131
|
"babel-loader": "^9.1.2",
|
|
132
132
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"chai": "^4.3.7",
|
|
143
143
|
"clean-webpack-plugin": "^4.0.0",
|
|
144
144
|
"cloc": "^2.11.0",
|
|
145
|
-
"core-js": "^3.
|
|
145
|
+
"core-js": "^3.29.0",
|
|
146
146
|
"coveralls": "^3.1.1",
|
|
147
147
|
"cross-env": "^7.0.3",
|
|
148
148
|
"css-loader": "^6.7.3",
|
|
@@ -153,17 +153,17 @@
|
|
|
153
153
|
"d3-polygon": "^3.0.1",
|
|
154
154
|
"docdash": "^2.0.1",
|
|
155
155
|
"dtslint": "^4.2.1",
|
|
156
|
-
"eslint": "^8.
|
|
156
|
+
"eslint": "^8.35.0",
|
|
157
157
|
"eslint-config-naver": "^2.1.0",
|
|
158
158
|
"eslint-plugin-import": "^2.27.5",
|
|
159
|
-
"eslint-plugin-jsdoc": "^
|
|
160
|
-
"eslint-webpack-plugin": "^
|
|
159
|
+
"eslint-plugin-jsdoc": "^40.0.1",
|
|
160
|
+
"eslint-webpack-plugin": "^4.0.0",
|
|
161
161
|
"exports-loader": "^4.0.0",
|
|
162
162
|
"hammer-simulator": "0.0.1",
|
|
163
163
|
"husky": "^8.0.3",
|
|
164
164
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
165
165
|
"istanbul-lib-instrument": "^5.2.1",
|
|
166
|
-
"jsdoc": "^4.0.
|
|
166
|
+
"jsdoc": "^4.0.2",
|
|
167
167
|
"karma": "^6.4.1",
|
|
168
168
|
"karma-chai": "^0.1.0",
|
|
169
169
|
"karma-chrome-launcher": "^3.1.1",
|
|
@@ -172,28 +172,28 @@
|
|
|
172
172
|
"karma-mocha-reporter": "^2.2.3",
|
|
173
173
|
"karma-scss-preprocessor": "^4.0.0",
|
|
174
174
|
"karma-sinon": "^1.0.5",
|
|
175
|
-
"karma-sourcemap-loader": "^0.
|
|
175
|
+
"karma-sourcemap-loader": "^0.4.0",
|
|
176
176
|
"karma-webpack": "^5.0.0",
|
|
177
|
-
"lint-staged": "^13.1.
|
|
177
|
+
"lint-staged": "^13.1.2",
|
|
178
178
|
"lite-fixture": "^1.0.2",
|
|
179
179
|
"mini-css-extract-plugin": "^2.7.2",
|
|
180
180
|
"mocha": "^10.2.0",
|
|
181
181
|
"node-sass": "^8.0.0",
|
|
182
182
|
"regenerator-runtime": "^0.13.11",
|
|
183
|
-
"rollup": "^3.
|
|
183
|
+
"rollup": "^3.18.0",
|
|
184
184
|
"rollup-plugin-delete": "^2.0.0",
|
|
185
185
|
"sass-loader": "^13.2.0",
|
|
186
|
-
"semantic-release": "^20.
|
|
186
|
+
"semantic-release": "^20.1.1",
|
|
187
187
|
"simulant": "^0.2.2",
|
|
188
188
|
"sinon": "^15.0.1",
|
|
189
189
|
"string-replace-loader": "^3.1.0",
|
|
190
190
|
"style-loader": "^3.3.1",
|
|
191
191
|
"taffydb": "^2.7.3",
|
|
192
192
|
"terser-webpack-plugin": "^5.3.6",
|
|
193
|
-
"tslib": "^2.
|
|
194
|
-
"typescript": "4.9.
|
|
193
|
+
"tslib": "^2.5.0",
|
|
194
|
+
"typescript": "4.9.5",
|
|
195
195
|
"webpack": "^5.75.0",
|
|
196
|
-
"webpack-bundle-analyzer": "^4.
|
|
196
|
+
"webpack-bundle-analyzer": "^4.8.0",
|
|
197
197
|
"webpack-clean": "^1.2.5",
|
|
198
198
|
"webpack-cli": "^5.0.1",
|
|
199
199
|
"webpack-common-shake": "^2.1.0",
|
|
@@ -122,7 +122,6 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
isMultipleX(): boolean {
|
|
124
124
|
return notEmpty(this.config.data_xs) ||
|
|
125
|
-
!this.config.data_xSort ||
|
|
126
125
|
this.hasType("bubble") ||
|
|
127
126
|
this.hasType("scatter");
|
|
128
127
|
},
|
|
@@ -343,10 +342,11 @@ export default {
|
|
|
343
342
|
|
|
344
343
|
if (!isNumber(total)) {
|
|
345
344
|
const sum = mergeArray($$.data.targets.map(t => t.values))
|
|
346
|
-
.map(v => v.value)
|
|
347
|
-
|
|
345
|
+
.map(v => v.value);
|
|
346
|
+
|
|
347
|
+
total = sum.length ? sum.reduce((p, c) => p + c) : 0;
|
|
348
348
|
|
|
349
|
-
$$.cache.add(cacheKey, total
|
|
349
|
+
$$.cache.add(cacheKey, total);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
if (subtractHidden) {
|
|
@@ -406,7 +406,7 @@ export default {
|
|
|
406
406
|
target = sortValue(getUnique(target))
|
|
407
407
|
.map((x, index) => ({x, index}));
|
|
408
408
|
} else if (length) {
|
|
409
|
-
target = target[0].values;
|
|
409
|
+
target = target[0].values.concat();
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
return target;
|
|
@@ -1006,7 +1006,7 @@ export default {
|
|
|
1006
1006
|
|
|
1007
1007
|
return $$.isBubbleType(d) && (
|
|
1008
1008
|
(isObject(d.value) && ("z" in d.value || "y" in d.value)) ||
|
|
1009
|
-
(isArray(d.value) && d.value.length
|
|
1009
|
+
(isArray(d.value) && d.value.length >= 2)
|
|
1010
1010
|
);
|
|
1011
1011
|
},
|
|
1012
1012
|
|
|
@@ -1020,7 +1020,7 @@ export default {
|
|
|
1020
1020
|
const $$ = this;
|
|
1021
1021
|
const {value} = d;
|
|
1022
1022
|
|
|
1023
|
-
return $$.isBarType(d) && isArray(value) && value.length
|
|
1023
|
+
return $$.isBarType(d) && isArray(value) && value.length >= 2 && value.every(v => isNumber(v));
|
|
1024
1024
|
},
|
|
1025
1025
|
|
|
1026
1026
|
/**
|
|
@@ -66,6 +66,10 @@ export default {
|
|
|
66
66
|
// Set data and update eventReceiver.data
|
|
67
67
|
const xAxisTickValues = $$.getMaxDataCountTarget();
|
|
68
68
|
|
|
69
|
+
if (!config.data_xSort) {
|
|
70
|
+
xAxisTickValues.sort((a, b) => a.x - b.x);
|
|
71
|
+
}
|
|
72
|
+
|
|
69
73
|
// update data's index value to be alinged with the x Axis
|
|
70
74
|
$$.updateDataIndexByX(xAxisTickValues);
|
|
71
75
|
$$.updateXs(xAxisTickValues);
|
|
@@ -40,18 +40,18 @@ export default {
|
|
|
40
40
|
$$.updateCircleY && ($$.circleY = $$.updateCircleY());
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// Data empty label positioning and text.
|
|
44
|
+
config.data_empty_label_text && main.select(`text.${$TEXT.text}.${$COMMON.empty}`)
|
|
45
|
+
.attr("x", state.width / 2)
|
|
46
|
+
.attr("y", state.height / 2)
|
|
47
|
+
.text(config.data_empty_label_text)
|
|
48
|
+
.style("display", targetsToShow.length ? "none" : null);
|
|
49
|
+
|
|
43
50
|
// update axis
|
|
44
51
|
if (state.hasAxis) {
|
|
45
52
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
46
53
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
47
54
|
|
|
48
|
-
// Data empty label positioning and text.
|
|
49
|
-
config.data_empty_label_text && main.select(`text.${$TEXT.text}.${$COMMON.empty}`)
|
|
50
|
-
.attr("x", state.width / 2)
|
|
51
|
-
.attr("y", state.height / 2)
|
|
52
|
-
.text(config.data_empty_label_text)
|
|
53
|
-
.style("display", targetsToShow.length ? "none" : null);
|
|
54
|
-
|
|
55
55
|
// grid
|
|
56
56
|
$$.hasGrid() && $$.updateGrid();
|
|
57
57
|
|
|
@@ -758,6 +758,8 @@ export default {
|
|
|
758
758
|
const {config, state} = $$;
|
|
759
759
|
const hasMultiArcGauge = $$.hasMultiArcGauge();
|
|
760
760
|
const isFullCircle = config.gauge_fullCircle;
|
|
761
|
+
const showEmptyTextLabel = $$.filterTargetsToShow($$.data.targets).length === 0 &&
|
|
762
|
+
!!config.data_empty_label_text;
|
|
761
763
|
|
|
762
764
|
const startAngle = $$.getStartAngle();
|
|
763
765
|
const endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
|
|
@@ -779,7 +781,7 @@ export default {
|
|
|
779
781
|
.merge(backgroundArc)
|
|
780
782
|
.style("fill", (config.gauge_background) || null)
|
|
781
783
|
.attr("d", ({id}) => {
|
|
782
|
-
if (state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
784
|
+
if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
783
785
|
return "M 0 0";
|
|
784
786
|
}
|
|
785
787
|
|
|
@@ -795,7 +797,7 @@ export default {
|
|
|
795
797
|
|
|
796
798
|
backgroundArc.exit().remove();
|
|
797
799
|
} else {
|
|
798
|
-
backgroundArc.attr("d", () => {
|
|
800
|
+
backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : () => {
|
|
799
801
|
const d = {
|
|
800
802
|
data: [{value: config.gauge_max}],
|
|
801
803
|
startAngle,
|
|
@@ -180,14 +180,13 @@ export default {
|
|
|
180
180
|
let radius = 0;
|
|
181
181
|
|
|
182
182
|
const isGrouped = $$.isGrouped(d.id);
|
|
183
|
-
// const hasRadius = d.value !== 0 && getRadius;
|
|
184
183
|
const isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : false;
|
|
185
184
|
|
|
186
|
-
if (getRadius
|
|
185
|
+
if (getRadius) {
|
|
187
186
|
const index = isRotated ? indexY : indexX;
|
|
188
187
|
const barW = points[2][index] - points[0][index];
|
|
189
188
|
|
|
190
|
-
radius = getRadius(barW);
|
|
189
|
+
radius = !isGrouped || isRadiusData ? getRadius(barW) : 0;
|
|
191
190
|
|
|
192
191
|
const arc = `a${radius},${radius} ${isNegative ? `1 0 0` : `0 0 1`} `;
|
|
193
192
|
|
|
@@ -63,13 +63,22 @@ export default {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Sort on x axis.
|
|
66
|
+
* - **NOTE:** This option works for lineish(area/line/spline/step) types only.
|
|
66
67
|
* @name data․xSort
|
|
67
68
|
* @memberof Options
|
|
68
69
|
* @type {boolean}
|
|
69
70
|
* @default true
|
|
71
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)
|
|
70
72
|
* @example
|
|
71
73
|
* data: {
|
|
72
|
-
* xSort: false
|
|
74
|
+
* xSort: false,
|
|
75
|
+
* x: "x",
|
|
76
|
+
* columns: [
|
|
77
|
+
* // The line graph will start to be drawn following the x axis sequence
|
|
78
|
+
* // Below data, wil start drawing x=1: 200, x=2: 300, x=3: 100
|
|
79
|
+
* ["x", 3, 1, 2],
|
|
80
|
+
* ["data1", 100, 200, 300]
|
|
81
|
+
* ]
|
|
73
82
|
* }
|
|
74
83
|
*/
|
|
75
84
|
data_xSort: true,
|
package/src/module/util.ts
CHANGED
|
@@ -320,8 +320,11 @@ function getBoundingRect(node): {
|
|
|
320
320
|
* @returns {number|string}
|
|
321
321
|
* @private
|
|
322
322
|
*/
|
|
323
|
-
function getRandom(asStr
|
|
324
|
-
const
|
|
323
|
+
function getRandom(asStr = true, min = 0, max = 10000) {
|
|
324
|
+
const crpt = window.crypto || window.msCrypto;
|
|
325
|
+
const rand = crpt ?
|
|
326
|
+
min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) :
|
|
327
|
+
Math.floor(Math.random() * (max - min) + min);
|
|
325
328
|
|
|
326
329
|
return asStr ? String(rand) : rand;
|
|
327
330
|
}
|