billboard.js 3.9.2 → 3.10.0-next.1

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.
Files changed (91) hide show
  1. package/README.md +2 -2
  2. package/dist/billboard.css +2 -2
  3. package/dist/billboard.js +2705 -2529
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +3516 -3329
  7. package/dist/billboard.pkgd.min.js +4 -4
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +15 -15
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +215 -196
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +244 -239
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +184 -164
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +170 -151
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/{billboardjs-plugin-bubblecompare.js → billboardjs-plugin-bubblecompare.pkgd.js} +667 -642
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +12 -0
  20. package/dist/plugin/pkgd/{billboardjs-plugin-sparkline.js → billboardjs-plugin-sparkline.pkgd.js} +864 -820
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +12 -0
  22. package/dist/plugin/pkgd/{billboardjs-plugin-stanford.js → billboardjs-plugin-stanford.pkgd.js} +929 -900
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -0
  24. package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js} +833 -788
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +12 -0
  26. package/dist/plugin/pkgd/{billboardjs-plugin-textoverlap.js → billboardjs-plugin-textoverlap.pkgd.js} +932 -897
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +12 -0
  28. package/dist/theme/dark.css +5 -4
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +5 -4
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +5 -4
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +5 -4
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist-esm/billboard.js +605 -468
  37. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
  38. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +13 -7
  39. package/dist-esm/plugin/billboardjs-plugin-stanford.js +21 -28
  40. package/dist-esm/plugin/billboardjs-plugin-tableview.js +17 -11
  41. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +13 -7
  42. package/package.json +31 -31
  43. package/src/Chart/api/axis.ts +4 -0
  44. package/src/Chart/api/category.ts +8 -4
  45. package/src/Chart/api/export.ts +1 -2
  46. package/src/Chart/api/subchart.ts +162 -89
  47. package/src/Chart/api/zoom.ts +69 -79
  48. package/src/ChartInternal/Axis/AxisRendererHelper.ts +0 -8
  49. package/src/ChartInternal/data/IData.ts +4 -1
  50. package/src/ChartInternal/data/convert.helper.ts +1 -15
  51. package/src/ChartInternal/data/data.ts +8 -2
  52. package/src/ChartInternal/interactions/eventrect.ts +0 -1
  53. package/src/ChartInternal/interactions/flow.ts +1 -7
  54. package/src/ChartInternal/interactions/interaction.ts +10 -4
  55. package/src/ChartInternal/interactions/subchart.ts +36 -30
  56. package/src/ChartInternal/interactions/zoom.ts +13 -3
  57. package/src/ChartInternal/internals/category.ts +2 -2
  58. package/src/ChartInternal/internals/clip.ts +4 -4
  59. package/src/ChartInternal/internals/domain.ts +46 -10
  60. package/src/ChartInternal/internals/grid.ts +57 -86
  61. package/src/ChartInternal/internals/redraw.ts +0 -5
  62. package/src/ChartInternal/internals/region.ts +35 -12
  63. package/src/ChartInternal/internals/text.ts +1 -26
  64. package/src/ChartInternal/internals/title.ts +10 -48
  65. package/src/ChartInternal/internals/tooltip.ts +47 -51
  66. package/src/ChartInternal/shape/arc.ts +16 -6
  67. package/src/ChartInternal/shape/candlestick.ts +2 -17
  68. package/src/ChartInternal/shape/shape.ts +50 -4
  69. package/src/ChartInternal/shape/treemap.ts +2 -2
  70. package/src/Plugin/bubblecompare/index.ts +1 -1
  71. package/src/Plugin/stanford/Elements.ts +10 -2
  72. package/src/Plugin/stanford/index.ts +1 -24
  73. package/src/Plugin/tableview/index.ts +2 -2
  74. package/src/config/Options/axis/x.ts +1 -0
  75. package/src/config/Options/common/main.ts +12 -2
  76. package/src/config/Options/common/tooltip.ts +10 -10
  77. package/src/config/Options/data/axis.ts +3 -1
  78. package/src/config/Options/data/data.ts +10 -2
  79. package/src/config/Store/State.ts +3 -0
  80. package/src/module/Cache.ts +7 -5
  81. package/src/module/browser.ts +34 -14
  82. package/src/module/util.ts +8 -4
  83. package/src/module/worker.ts +24 -13
  84. package/src/scss/billboard.scss +4 -2
  85. package/src/scss/theme/dark.scss +4 -2
  86. package/src/scss/theme/datalab.scss +4 -2
  87. package/src/scss/theme/graph.scss +4 -2
  88. package/src/scss/theme/insight.scss +4 -2
  89. package/types/chart.d.ts +11 -0
  90. package/types/options.d.ts +3 -3
  91. 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.9.2
8
+ * @version 3.10.0-next.1
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
- var Plugin = /*#__PURE__*/function () {
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.9.2";
189
+ Plugin.version = "3.10.0-next.1";
190
190
 
191
191
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
192
192
 
@@ -236,7 +236,7 @@ Plugin.version = "3.9.2";
236
236
  * ]
237
237
  * })
238
238
  */
239
- var BubbleCompare = /*#__PURE__*/function (_Plugin) {
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
- var $$ = this.$$;
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
- var baseR = this.getBubbleR(d),
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.svg.select(".bb-event-rect").style("cursor", "pointer");
265
+ this.$$.$el.eventRect.style("cursor", "pointer");
266
266
  };
267
267
  _proto.findClosest = function findClosest(values, pos) {
268
- var _this2 = this,
269
- $$ = this.$$;
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
- var d = $$.dist(cur, pos);
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
- _this$options = this.options,
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
- var _this$$$$data$targets = this.$$.data.targets.reduce(function (_ref, cur) {
287
- var accMin = _ref[0],
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
- var val = this.getZData(cur.values[0]);
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.9.2
8
+ * @version 3.10.0-next.1
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,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.9.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}()}));
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.1";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}()}));