billboard.js 2.2.6 → 2.2.8-a
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/CHANGELOG.md +7 -0
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +3001 -3650
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/{billboard.esm.js → billboard.mjs} +379 -378
- package/dist/billboard.pkgd.js +18206 -14604
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +30 -45
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-bubblecompare.esm.js → billboardjs-plugin-bubblecompare.mjs} +14 -21
- package/dist/plugin/billboardjs-plugin-stanford.js +281 -345
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-stanford.esm.js → billboardjs-plugin-stanford.mjs} +31 -39
- package/dist/plugin/billboardjs-plugin-textoverlap.js +243 -291
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-textoverlap.esm.js → billboardjs-plugin-textoverlap.mjs} +20 -28
- 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/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/ChartInternal/.DS_Store +0 -0
- package/src/ChartInternal/data/data.ts +3 -2
- package/src/ChartInternal/internals/redraw.ts +7 -6
- package/src/ChartInternal/shape/.DS_Store +0 -0
- package/src/ChartInternal/shape/arc.ts +4 -2
- package/src/Plugin/.DS_Store +0 -0
- package/src/config/.DS_Store +0 -0
- package/src/config/Options/.DS_Store +0 -0
- package/src/config/Store/.DS_Store +0 -0
- package/types/.DS_Store +0 -0
- package/types/plugin/.DS_Store +0 -0
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-voronoi"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-voronoi","d3-polygon","d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-voronoi"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.textoverlap=e(t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,o){return function(){"use strict";var r=[,function(t){t.exports=n},,,,,function(t){t.exports=o},,,,function(e){e.exports=t},function(t){t.exports=e}],i={};function c(t){
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-voronoi"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-voronoi","d3-polygon","d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-voronoi"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.textoverlap=e(t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,n,o){return function(){"use strict";var r=[,function(t){t.exports=n},,,,,function(t){t.exports=o},,,,function(e){e.exports=t},function(t){t.exports=e}],i={};function c(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return r[t](n,n.exports,c),n.exports}c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}c.d(u,{default:function(){return d}});var n=c(10),o=c(11),r=c(1);c(6);var i="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")(),a=i&&i.document;var l=function(t){return void 0!==t},s=function(t){return"object"==typeof t};!function(){try{return new MouseEvent("t"),function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}),t.dispatchEvent(new MouseEvent(e,n))}}catch(t){return function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var o=a.createEvent("MouseEvent");o.initMouseEvent(e,n.bubbles,n.cancelable,i,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(o)}}}();function f(t){var e,n,o,r=this.config,i=function(){var t=n.shift();return t&&e&&s(e)&&t in e?(e=e[t],i()):t?void 0:e};Object.keys(r).forEach((function(c){e=t,n=c.split("_"),o=i(),l(o)&&(r[c]=o)}))}var b=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();b.version="2.2.8a";var p=function(){return{selector:".bb-texts text",extent:1,area:0}},d=function(i){function c(e){var n;return(n=i.call(this,e)||this).config=void 0,n.config=new p,t(n)||t(n)}var u,a;a=i,(u=c).prototype=Object.create(a.prototype),u.prototype.constructor=u,e(u,a);var l=c.prototype;return l.$init=function(){f.call(this,this.options)},l.$redraw=function(){var t=(0,r.selectAll)(this.config.selector);t.empty()||this.preventLabelOverlap(t)},l.generateVoronoi=function(t){var e=this.$$.scale,o=["x","y"].map((function(t){return e[t].domain()})),r=o[0],i=o[1],c=[i[0],r[1]];return r[1]=c[0],i[0]=c[1],(0,n.voronoi)().extent([r,i]).polygons(t)},l.preventLabelOverlap=function(t){var e=this.config,n=e.extent,i=e.area,c=this.generateVoronoi(t.data().map((function(t){return[t.x,t.value]}))),u=0;t.each((function(){var t=c[u++];if(t&&this){var e=t.data,a=e[0],l=e[1],s=(0,o.polygonCentroid)(t),f=s[0],b=s[1],p=Math.round(Math.atan2(b-l,f-a)/Math.PI*2),d=n*(0===p?1:-1),v=-1===p?-n:n+5,h=1===Math.abs(p)?"middle":0===p?"start":"end";(0,r.select)(this).attr("display",(0,o.polygonArea)(t)<i?"none":null).attr("text-anchor",h).attr("dy","0."+(1===p?71:35)+"em").attr("transform","translate("+d+", "+v+")")}}))},c}(b)}(),u=u.default}()}));
|
package/dist/plugin/{billboardjs-plugin-textoverlap.esm.js → billboardjs-plugin-textoverlap.mjs}
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -14,7 +14,7 @@ import { polygonCentroid, polygonArea } from 'd3-polygon';
|
|
|
14
14
|
import { selectAll, select } from 'd3-selection';
|
|
15
15
|
import 'd3-brush';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
/******************************************************************************
|
|
18
18
|
Copyright (c) Microsoft Corporation.
|
|
19
19
|
|
|
20
20
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -28,8 +28,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
28
28
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
29
29
|
PERFORMANCE OF THIS SOFTWARE.
|
|
30
30
|
***************************************************************************** */
|
|
31
|
-
|
|
32
31
|
/* global Reflect, Promise */
|
|
32
|
+
|
|
33
33
|
var _extendStatics = function extendStatics(d, b) {
|
|
34
34
|
return _extendStatics = Object.setPrototypeOf || {
|
|
35
35
|
__proto__: []
|
|
@@ -39,19 +39,16 @@ var _extendStatics = function extendStatics(d, b) {
|
|
|
39
39
|
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
|
40
40
|
}, _extendStatics(d, b);
|
|
41
41
|
};
|
|
42
|
-
|
|
43
42
|
function __extends(d, b) {
|
|
44
43
|
function __() {
|
|
45
44
|
this.constructor = d;
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + (b + "") + " is not a constructor or null");
|
|
49
47
|
_extendStatics(d, b), d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
50
48
|
}
|
|
51
|
-
function __spreadArray(to, from) {
|
|
52
|
-
for (var i = 0,
|
|
53
|
-
|
|
54
|
-
return to;
|
|
49
|
+
function __spreadArray(to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var ar, i = 0, l = from.length; i < l; i++) (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
|
|
51
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
/**
|
|
@@ -112,7 +109,7 @@ function mergeObj(target) {
|
|
|
112
109
|
}
|
|
113
110
|
});
|
|
114
111
|
}
|
|
115
|
-
return mergeObj.apply(void 0, __spreadArray([target], objectN));
|
|
112
|
+
return mergeObj.apply(void 0, __spreadArray([target], objectN, false));
|
|
116
113
|
}
|
|
117
114
|
// emulate event
|
|
118
115
|
({
|
|
@@ -199,12 +196,10 @@ function loadConfig(config) {
|
|
|
199
196
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
200
197
|
* billboard.js project is licensed under the MIT license
|
|
201
198
|
*/
|
|
202
|
-
|
|
203
199
|
/**
|
|
204
200
|
* Base class to generate billboard.js plugin
|
|
205
201
|
* @class Plugin
|
|
206
202
|
*/
|
|
207
|
-
|
|
208
203
|
/**
|
|
209
204
|
* Version info string for plugin
|
|
210
205
|
* @name version
|
|
@@ -233,43 +228,40 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
233
228
|
function Plugin(options) {
|
|
234
229
|
options === void 0 && (options = {}), this.$$, this.options = options;
|
|
235
230
|
}
|
|
231
|
+
|
|
236
232
|
/**
|
|
237
233
|
* Lifecycle hook for 'beforeInit' phase.
|
|
238
234
|
* @private
|
|
239
235
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
236
|
var _proto = Plugin.prototype;
|
|
243
237
|
return _proto.$beforeInit = function $beforeInit() {}
|
|
238
|
+
|
|
244
239
|
/**
|
|
245
240
|
* Lifecycle hook for 'init' phase.
|
|
246
241
|
* @private
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
*/, _proto.$init = function $init() {}
|
|
243
|
+
|
|
249
244
|
/**
|
|
250
245
|
* Lifecycle hook for 'afterInit' phase.
|
|
251
246
|
* @private
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
*/, _proto.$afterInit = function $afterInit() {}
|
|
248
|
+
|
|
254
249
|
/**
|
|
255
250
|
* Lifecycle hook for 'redraw' phase.
|
|
256
251
|
* @private
|
|
257
|
-
|
|
258
|
-
|
|
252
|
+
*/, _proto.$redraw = function $redraw() {}
|
|
253
|
+
|
|
259
254
|
/**
|
|
260
255
|
* Lifecycle hook for 'willDestroy' phase.
|
|
261
256
|
* @private
|
|
262
|
-
|
|
263
|
-
, _proto.$willDestroy = function $willDestroy() {
|
|
257
|
+
*/, _proto.$willDestroy = function $willDestroy() {
|
|
264
258
|
var _this = this;
|
|
265
|
-
|
|
266
259
|
Object.keys(this).forEach(function (key) {
|
|
267
260
|
_this[key] = null, delete _this[key];
|
|
268
261
|
});
|
|
269
262
|
}, Plugin;
|
|
270
263
|
}();
|
|
271
|
-
|
|
272
|
-
Plugin.version = "#2.2.6#";
|
|
264
|
+
Plugin.version = "#2.2.8a#";
|
|
273
265
|
|
|
274
266
|
/**
|
|
275
267
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -418,12 +410,12 @@ var TextOverlap = /** @class */ (function (_super) {
|
|
|
418
410
|
// @ts-ignore
|
|
419
411
|
.attr("display", polygonArea(cell) < area ? "none" : null)
|
|
420
412
|
.attr("text-anchor", txtAnchor)
|
|
421
|
-
.attr("dy", "0."
|
|
422
|
-
.attr("transform", "translate("
|
|
413
|
+
.attr("dy", "0.".concat(angle === 1 ? 71 : 35, "em"))
|
|
414
|
+
.attr("transform", "translate(".concat(xTranslate, ", ").concat(yTranslate, ")"));
|
|
423
415
|
}
|
|
424
416
|
});
|
|
425
417
|
};
|
|
426
418
|
return TextOverlap;
|
|
427
419
|
}(Plugin));
|
|
428
420
|
|
|
429
|
-
export default
|
|
421
|
+
export { TextOverlap as default };
|
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 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-size:11px;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-font-smoothing:antialiased;user-select:none;fill:#555;font-size:11px}.bb-axis{stroke-width:.7px}.bb-axis-y2 text,.bb-axis-y 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 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}path.bb-bar{stroke-width:1px;stroke:#000}path.bb-bar._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;transform:translate(7px,1px);stroke-dasharray:1 20}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-tooltip-container{z-index:10;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;border-radius:2px;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px;-webkit-font-smoothing:antialiased}.bb-tooltip th{font-size:13px;padding:2px 8px;text-align:left;border-bottom:2px solid #ff2d2d;background-color:#0b00b1;color:#fffdfd}.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{display:inline-block;width:8px;height:8px;margin-right:6px;border:1px solid #000;border-radius:3px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:11px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.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{font-size:18px!important;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:1px solid #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
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 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-size:12px;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:12px;letter-spacing:-.3px}.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-y2 text,.bb-axis-y 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 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-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{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1px}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-tooltip-container{z-index:10;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none}.bb-tooltip{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;border-radius:2px;background-color:#fff;text-align:left;font-size:12px;box-shadow:.5px .5px 1px #999}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:center;border-bottom:1px dotted #000;background-color:#efefef;color:#000}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{padding:3px 6px;background-color:#fff;border-bottom:1px solid #eee}.bb-tooltip td:first-child{padding-left:5px;border-right:1px solid #eee}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:5px;height:12px;margin-right:6px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.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{font-size:16px!important;fill:#8c8c8c;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.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{font-size:1.15em;font-weight:700;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:1px solid #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer;opacity:.8;box-shadow:1px 1px 2px #ccc}
|
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 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-size:12px;font-family:sans-serif,Arial,nanumgothic,Dotum;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:11px}.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-y2 text,.bb-axis-y 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 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-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{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-tooltip-container{z-index:10;font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:left;border-bottom:1px solid #eee}.bb-tooltip td{padding:4px 6px;background-color:#fff}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:5px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.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{font-size:16px!important;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:1px solid #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8a",
|
|
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",
|
|
7
|
-
"module": "dist/billboard.
|
|
7
|
+
"module": "dist/billboard.mjs",
|
|
8
8
|
"types": "types/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "webpack-dev-server --open",
|
package/src/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -343,8 +343,9 @@ export default {
|
|
|
343
343
|
|
|
344
344
|
if (!isNumber(total)) {
|
|
345
345
|
const sum = mergeArray($$.data.targets.map(t => t.values))
|
|
346
|
-
.map(v => v.value)
|
|
347
|
-
|
|
346
|
+
.map(v => v.value);
|
|
347
|
+
|
|
348
|
+
total = sum.length ? sum.reduce((p, c) => p + c) : 0;
|
|
348
349
|
|
|
349
350
|
$$.cache.add(cacheKey, total = sum);
|
|
350
351
|
}
|
|
@@ -41,17 +41,18 @@ export default {
|
|
|
41
41
|
$$.updateCircleY && $$.updateCircleY();
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
// Data empty label positioning and text.
|
|
45
|
+
config.data_empty_label_text && main.select(`text.${CLASS.text}.${CLASS.empty}`)
|
|
46
|
+
.attr("x", state.width / 2)
|
|
47
|
+
.attr("y", state.height / 2)
|
|
48
|
+
.text(config.data_empty_label_text)
|
|
49
|
+
.style("display", targetsToShow.length ? "none" : null);
|
|
50
|
+
|
|
44
51
|
// update axis
|
|
45
52
|
if (state.hasAxis) {
|
|
46
53
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
47
54
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
48
55
|
|
|
49
|
-
// Data empty label positioning and text.
|
|
50
|
-
config.data_empty_label_text && main.select(`text.${CLASS.text}.${CLASS.empty}`)
|
|
51
|
-
.attr("x", state.width / 2)
|
|
52
|
-
.attr("y", state.height / 2)
|
|
53
|
-
.text(config.data_empty_label_text)
|
|
54
|
-
.style("display", targetsToShow.length ? "none" : null);
|
|
55
56
|
|
|
56
57
|
// grid
|
|
57
58
|
$$.hasGrid() && $$.updateGrid(duration);
|
|
Binary file
|
|
@@ -659,6 +659,8 @@ export default {
|
|
|
659
659
|
const {config, state} = $$;
|
|
660
660
|
const hasMultiArcGauge = $$.hasMultiArcGauge();
|
|
661
661
|
const isFullCircle = config.gauge_fullCircle;
|
|
662
|
+
const showEmptyTextLabel = $$.filterTargetsToShow($$.data.targets).length === 0 &&
|
|
663
|
+
!!config.data_empty_label_text;
|
|
662
664
|
|
|
663
665
|
const startAngle = $$.getStartAngle();
|
|
664
666
|
const endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
|
|
@@ -680,7 +682,7 @@ export default {
|
|
|
680
682
|
.merge(backgroundArc)
|
|
681
683
|
.style("fill", (config.gauge_background) || null)
|
|
682
684
|
.attr("d", ({id}) => {
|
|
683
|
-
if (state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
685
|
+
if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
|
|
684
686
|
return "M 0 0";
|
|
685
687
|
}
|
|
686
688
|
|
|
@@ -696,7 +698,7 @@ export default {
|
|
|
696
698
|
|
|
697
699
|
backgroundArc.exit().remove();
|
|
698
700
|
} else {
|
|
699
|
-
backgroundArc.attr("d", () => {
|
|
701
|
+
backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : () => {
|
|
700
702
|
const d = {
|
|
701
703
|
data: [{value: config.gauge_max}],
|
|
702
704
|
startAngle,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/types/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|