billboard.js 3.4.0 → 3.5.0-next.2
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 +11 -4
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +3901 -1451
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +8350 -5297
- package/dist/billboard.pkgd.min.js +3 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +29 -13
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +377 -92
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +447 -109
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +341 -74
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +337 -75
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +4233 -3792
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +4635 -3889
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +4823 -3937
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +4594 -3866
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +4606 -3874
- 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 +796 -387
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +47 -75
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +68 -86
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +52 -77
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +49 -76
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +49 -76
- package/package.json +40 -40
- package/src/Chart/api/chart.ts +4 -1
- package/src/Chart/api/data.ts +2 -2
- package/src/Chart/api/flow.ts +125 -115
- package/src/ChartInternal/Axis/AxisRenderer.ts +29 -3
- package/src/ChartInternal/ChartInternal.ts +55 -18
- package/src/ChartInternal/data/IData.ts +2 -2
- package/src/ChartInternal/data/convert.helper.ts +226 -0
- package/src/ChartInternal/data/convert.ts +43 -210
- package/src/ChartInternal/data/load.ts +5 -4
- package/src/ChartInternal/interactions/zoom.ts +17 -4
- package/src/ChartInternal/internals/color.ts +59 -36
- package/src/ChartInternal/internals/grid.ts +5 -3
- package/src/ChartInternal/internals/redraw.ts +5 -2
- package/src/ChartInternal/internals/scale.ts +3 -1
- package/src/ChartInternal/internals/size.axis.ts +5 -2
- package/src/ChartInternal/internals/text.ts +118 -17
- package/src/ChartInternal/shape/area.ts +14 -7
- package/src/ChartInternal/shape/bar.ts +19 -10
- package/src/ChartInternal/shape/point.ts +15 -9
- package/src/ChartInternal/shape/polar.ts +1 -1
- package/src/Plugin/sparkline/index.ts +22 -11
- package/src/Plugin/stanford/index.ts +10 -7
- package/src/Plugin/textoverlap/index.ts +4 -1
- package/src/config/Options/Options.ts +2 -0
- package/src/config/Options/common/boost.ts +31 -0
- package/src/config/Options/common/main.ts +15 -1
- package/src/config/Options/common/tooltip.ts +1 -1
- package/src/config/Options/data/data.ts +11 -3
- package/src/config/Options/shape/area.ts +6 -1
- package/src/config/Store/State.ts +3 -0
- package/src/module/browser.ts +2 -1
- package/src/module/generator.ts +18 -16
- package/src/module/util.ts +115 -1
- package/types/chart.d.ts +2 -2
- package/types/options.d.ts +45 -8
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.5.0-next.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -83,6 +83,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
83
83
|
"default": function() { return /* binding */ BubbleCompare; }
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/newArrowCheck.js
|
|
87
|
+
function _newArrowCheck(innerThis, boundThis) {
|
|
88
|
+
if (innerThis !== boundThis) {
|
|
89
|
+
throw new TypeError("Cannot instantiate an arrow function");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
86
92
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
87
93
|
function _assertThisInitialized(self) {
|
|
88
94
|
if (self === void 0) {
|
|
@@ -93,11 +99,10 @@ function _assertThisInitialized(self) {
|
|
|
93
99
|
}
|
|
94
100
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
95
101
|
function _setPrototypeOf(o, p) {
|
|
96
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
102
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
97
103
|
o.__proto__ = p;
|
|
98
104
|
return o;
|
|
99
105
|
};
|
|
100
|
-
|
|
101
106
|
return _setPrototypeOf(o, p);
|
|
102
107
|
}
|
|
103
108
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
@@ -110,6 +115,8 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
110
115
|
// EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
|
|
111
116
|
var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
|
|
112
117
|
;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
|
|
118
|
+
|
|
119
|
+
|
|
113
120
|
/**
|
|
114
121
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
115
122
|
* billboard.js project is licensed under the MIT license
|
|
@@ -184,21 +191,24 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
184
191
|
var _this = this;
|
|
185
192
|
|
|
186
193
|
Object.keys(this).forEach(function (key) {
|
|
187
|
-
_this
|
|
188
|
-
|
|
189
|
-
|
|
194
|
+
_newArrowCheck(this, _this);
|
|
195
|
+
|
|
196
|
+
this[key] = null;
|
|
197
|
+
delete this[key];
|
|
198
|
+
}.bind(this));
|
|
190
199
|
};
|
|
191
200
|
|
|
192
201
|
return Plugin;
|
|
193
202
|
}();
|
|
194
203
|
|
|
195
|
-
Plugin.version = "3.
|
|
204
|
+
Plugin.version = "3.5.0-next.2";
|
|
196
205
|
|
|
197
206
|
;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
|
|
198
207
|
|
|
199
208
|
|
|
200
209
|
|
|
201
210
|
|
|
211
|
+
|
|
202
212
|
/**
|
|
203
213
|
* Bubble compare diagram plugin.<br>
|
|
204
214
|
* Compare data 3-dimensional ways: x-axis, y-axis & bubble-size.
|
|
@@ -282,11 +292,15 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
282
292
|
$$ = this.$$;
|
|
283
293
|
|
|
284
294
|
return values.filter(function (v) {
|
|
295
|
+
_newArrowCheck(this, _this2);
|
|
296
|
+
|
|
285
297
|
return v && !$$.isBarType(v.id);
|
|
286
|
-
}).reduce(function (acc, cur) {
|
|
298
|
+
}.bind(this)).reduce(function (acc, cur) {
|
|
299
|
+
_newArrowCheck(this, _this2);
|
|
300
|
+
|
|
287
301
|
var d = $$.dist(cur, pos);
|
|
288
|
-
return d <
|
|
289
|
-
}, 0);
|
|
302
|
+
return d < this.getBubbleR(cur) ? cur : acc;
|
|
303
|
+
}.bind(this), 0);
|
|
290
304
|
};
|
|
291
305
|
|
|
292
306
|
_proto.getBubbleR = function getBubbleR(d) {
|
|
@@ -300,11 +314,13 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
300
314
|
|
|
301
315
|
var _this$$$$data$targets = this.$$.data.targets.reduce(function (_ref, cur) {
|
|
302
316
|
var accMin = _ref[0],
|
|
303
|
-
accMax = _ref[1]
|
|
304
|
-
|
|
317
|
+
accMax = _ref[1];
|
|
318
|
+
|
|
319
|
+
_newArrowCheck(this, _this3);
|
|
305
320
|
|
|
321
|
+
var val = this.getZData(cur.values[0]);
|
|
306
322
|
return [Math.min(accMin, val), Math.max(accMax, val)];
|
|
307
|
-
}, [1e4, 0]),
|
|
323
|
+
}.bind(this), [1e4, 0]),
|
|
308
324
|
min = _this$$$$data$targets[0],
|
|
309
325
|
max = _this$$$$data$targets[1],
|
|
310
326
|
size = min > 0 && max === min ? 0 : curVal / max;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.5.0-next.2
|
|
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-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};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
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.5.0-next.2";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)<this.getBubbleR(o)?o:e}.bind(this),0)},a.getBubbleR=function(e){var n=this,i=this.options,r=i.minR,o=i.maxR,s=this.getZData(e);if(!s)return r;var u=this.$$.data.targets.reduce(function(e,i){var r=e[0],o=e[1];t(this,n);var s=this.getZData(i.values[0]);return[Math.min(r,s),Math.max(o,s)]}.bind(this),[1e4,0]),a=u[0],c=u[1],f=a>0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()}));
|