billboard.js 3.9.4 → 3.10.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 +2 -2
- package/dist/billboard.css +2 -2
- package/dist/billboard.js +2742 -2516
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2936 -2704
- package/dist/billboard.pkgd.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +15 -15
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +205 -186
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +231 -226
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +172 -152
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +161 -142
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/{billboardjs-plugin-bubblecompare.js → billboardjs-plugin-bubblecompare.pkgd.js} +52 -32
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-sparkline.js → billboardjs-plugin-sparkline.pkgd.js} +239 -200
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-stanford.js → billboardjs-plugin-stanford.pkgd.js} +301 -277
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js} +206 -166
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-textoverlap.js → billboardjs-plugin-textoverlap.pkgd.js} +308 -278
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +12 -0
- package/dist/theme/dark.css +5 -4
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +5 -4
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +5 -4
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +5 -4
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +718 -509
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +15 -9
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +21 -28
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +17 -11
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +13 -7
- package/package.json +32 -32
- package/src/Chart/api/axis.ts +4 -0
- package/src/Chart/api/category.ts +8 -4
- package/src/Chart/api/export.ts +1 -2
- package/src/Chart/api/subchart.ts +162 -89
- package/src/Chart/api/zoom.ts +69 -79
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +0 -8
- package/src/ChartInternal/data/IData.ts +4 -1
- package/src/ChartInternal/data/convert.helper.ts +1 -15
- package/src/ChartInternal/data/data.ts +8 -2
- package/src/ChartInternal/interactions/eventrect.ts +3 -4
- package/src/ChartInternal/interactions/flow.ts +1 -7
- package/src/ChartInternal/interactions/interaction.ts +11 -5
- package/src/ChartInternal/interactions/subchart.ts +36 -30
- package/src/ChartInternal/interactions/zoom.ts +13 -3
- package/src/ChartInternal/internals/category.ts +2 -2
- package/src/ChartInternal/internals/clip.ts +4 -5
- package/src/ChartInternal/internals/color.ts +49 -23
- package/src/ChartInternal/internals/domain.ts +46 -10
- package/src/ChartInternal/internals/grid.ts +57 -86
- package/src/ChartInternal/internals/redraw.ts +1 -6
- package/src/ChartInternal/internals/region.ts +35 -12
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/text.ts +1 -26
- package/src/ChartInternal/internals/title.ts +10 -48
- package/src/ChartInternal/internals/tooltip.ts +50 -54
- package/src/ChartInternal/shape/arc.ts +2 -2
- package/src/ChartInternal/shape/candlestick.ts +2 -17
- package/src/ChartInternal/shape/point.ts +36 -8
- package/src/ChartInternal/shape/radar.ts +1 -1
- package/src/ChartInternal/shape/shape.ts +50 -4
- package/src/ChartInternal/shape/treemap.ts +2 -2
- package/src/Plugin/bubblecompare/index.ts +1 -1
- package/src/Plugin/sparkline/index.ts +2 -2
- package/src/Plugin/stanford/Elements.ts +10 -2
- package/src/Plugin/stanford/index.ts +1 -24
- package/src/Plugin/tableview/index.ts +2 -2
- package/src/config/Options/axis/x.ts +1 -0
- package/src/config/Options/common/main.ts +12 -2
- package/src/config/Options/common/point.ts +41 -0
- package/src/config/Options/common/tooltip.ts +10 -10
- package/src/config/Options/data/axis.ts +3 -1
- package/src/config/Options/data/data.ts +10 -2
- package/src/config/Options/shape/area.ts +10 -4
- package/src/config/Options/shape/bar.ts +10 -4
- package/src/config/Store/State.ts +3 -0
- package/src/module/Cache.ts +7 -5
- package/src/module/browser.ts +34 -14
- package/src/module/util.ts +8 -4
- package/src/module/worker.ts +24 -13
- package/src/scss/billboard.scss +4 -2
- package/src/scss/theme/dark.scss +4 -2
- package/src/scss/theme/datalab.scss +4 -2
- package/src/scss/theme/graph.scss +4 -2
- package/src/scss/theme/insight.scss +4 -2
- package/types/chart.d.ts +11 -0
- package/types/options.d.ts +9 -3
- package/types/options.shape.d.ts +26 -0
- package/types/types.d.ts +15 -1
|
@@ -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.10.0-next.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -132,7 +132,7 @@ var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_
|
|
|
132
132
|
* @example
|
|
133
133
|
* bb.plugin.stanford.version; // ex) 1.9.0
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
let Plugin = /*#__PURE__*/function () {
|
|
136
136
|
/**
|
|
137
137
|
* Constructor
|
|
138
138
|
* @param {Any} options config option object
|
|
@@ -186,7 +186,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
186
186
|
};
|
|
187
187
|
return Plugin;
|
|
188
188
|
}();
|
|
189
|
-
Plugin.version = "3.
|
|
189
|
+
Plugin.version = "3.10.0-next.2";
|
|
190
190
|
|
|
191
191
|
;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
|
|
192
192
|
|
|
@@ -236,7 +236,7 @@ Plugin.version = "3.9.4";
|
|
|
236
236
|
* ]
|
|
237
237
|
* })
|
|
238
238
|
*/
|
|
239
|
-
|
|
239
|
+
let BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
240
240
|
_inheritsLoose(BubbleCompare, _Plugin);
|
|
241
241
|
function BubbleCompare(options) {
|
|
242
242
|
var _this = _Plugin.call(this, options) || this;
|
|
@@ -245,13 +245,13 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
245
245
|
}
|
|
246
246
|
var _proto = BubbleCompare.prototype;
|
|
247
247
|
_proto.$init = function $init() {
|
|
248
|
-
|
|
248
|
+
const $$ = this.$$;
|
|
249
249
|
$$.findClosest = this.findClosest.bind(this);
|
|
250
250
|
$$.getBubbleR = this.getBubbleR.bind(this);
|
|
251
251
|
$$.pointExpandedR = this.pointExpandedR.bind(this);
|
|
252
252
|
};
|
|
253
253
|
_proto.pointExpandedR = function pointExpandedR(d) {
|
|
254
|
-
|
|
254
|
+
const baseR = this.getBubbleR(d),
|
|
255
255
|
_this$options$expandS = this.options.expandScale,
|
|
256
256
|
expandScale = _this$options$expandS === void 0 ? 1 : _this$options$expandS;
|
|
257
257
|
BubbleCompare.raiseFocusedBubbleLayer(d);
|
|
@@ -262,32 +262,32 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
262
262
|
d.raise && (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(d.node().parentNode.parentNode).raise();
|
|
263
263
|
};
|
|
264
264
|
_proto.changeCursorPoint = function changeCursorPoint() {
|
|
265
|
-
this.$$.$el.
|
|
265
|
+
this.$$.$el.eventRect.style("cursor", "pointer");
|
|
266
266
|
};
|
|
267
267
|
_proto.findClosest = function findClosest(values, pos) {
|
|
268
|
-
var _this2 = this
|
|
269
|
-
|
|
268
|
+
var _this2 = this;
|
|
269
|
+
const $$ = this.$$;
|
|
270
270
|
return values.filter(function (v) {
|
|
271
271
|
_newArrowCheck(this, _this2);
|
|
272
272
|
return v && !$$.isBarType(v.id);
|
|
273
273
|
}.bind(this)).reduce(function (acc, cur) {
|
|
274
274
|
_newArrowCheck(this, _this2);
|
|
275
|
-
|
|
275
|
+
const d = $$.dist(cur, pos);
|
|
276
276
|
return d < this.getBubbleR(cur) ? cur : acc;
|
|
277
277
|
}.bind(this), 0);
|
|
278
278
|
};
|
|
279
279
|
_proto.getBubbleR = function getBubbleR(d) {
|
|
280
|
-
var _this3 = this
|
|
281
|
-
|
|
280
|
+
var _this3 = this;
|
|
281
|
+
const _this$options = this.options,
|
|
282
282
|
minR = _this$options.minR,
|
|
283
283
|
maxR = _this$options.maxR,
|
|
284
284
|
curVal = this.getZData(d);
|
|
285
285
|
if (!curVal) return minR;
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
const _this$$$$data$targets = this.$$.data.targets.reduce(function (_ref, cur) {
|
|
287
|
+
let accMin = _ref[0],
|
|
288
288
|
accMax = _ref[1];
|
|
289
289
|
_newArrowCheck(this, _this3);
|
|
290
|
-
|
|
290
|
+
const val = this.getZData(cur.values[0]);
|
|
291
291
|
return [Math.min(accMin, val), Math.max(accMax, val)];
|
|
292
292
|
}.bind(this), [1e4, 0]),
|
|
293
293
|
min = _this$$$$data$targets[0],
|
|
@@ -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.10.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=
|
|
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={288:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.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 o={};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(o,{default:function(){return u}});var r=i(288);let 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.10.0-next.2";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const 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,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)<this.getBubbleR(r)?r:e}.bind(this),0)},c.getBubbleR=function(e){var n=this;const i=this.options,o=i.minR,r=i.maxR,s=this.getZData(e);if(!s)return o;const u=this.$$.data.targets.reduce(function(e,i){let o=e[0],r=e[1];t(this,n);const s=this.getZData(i.values[0]);return[Math.min(o,s),Math.max(r,s)]}.bind(this),[1e4,0]),c=u[0],a=u[1],f=c>0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()}));
|