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,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"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n={514:function(t){t.exports=e},288:function(e){e.exports=t}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}o.d(r,{default:function(){return D}});let s=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){n(this,t),this[e]=null,delete this[e]}.bind(this))},t}();s.version="3.10.0-next.2";let l=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}};const u="__tableview-style__",a="bb-tableview",f=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",b="<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",d='<th scope="col">{=title}</th>',h='<th scope="row">{=value}</th>',p="<td>{=value}</td>";o(288),o(514);const v="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")(),g=null==v?void 0:v.document,y=function(t){var e=this;const i="function"==typeof(null==t?void 0:t.requestAnimationFrame),o="function"==typeof(null==t?void 0:t.requestIdleCallback);return[i?t.requestAnimationFrame:function(t){return n(this,e),setTimeout(t,1)}.bind(this),i?t.cancelAnimationFrame:function(t){return n(this,e),clearTimeout(t)}.bind(this),o?t.requestIdleCallback:m,o?t.cancelIdleCallback:w]}(v),m=y[0],w=y[1];y[2],y[3];var O=void 0;(function(t){return n(this,O),t||0===t}).bind(void 0),function(t){return n(this,O),"function"==typeof t}.bind(void 0);const j=function(t){return n(this,O),"string"==typeof t}.bind(void 0),E=function(t){return n(this,O),"number"==typeof t}.bind(void 0),T=function(t){return n(this,O),void 0===t}.bind(void 0),$=function(t){return n(this,O),void 0!==t}.bind(void 0),x=(function(t){return n(this,O),"boolean"==typeof t}.bind(void 0),function(t){return n(this,O),10*Math.ceil(t/10)}.bind(void 0),function(t){return n(this,O),Math.ceil(t)+.5}.bind(void 0),function(t){return n(this,O),t[1]-t[0]}.bind(void 0),function(t){return n(this,O),"object"==typeof t}.bind(void 0)),S=function(t){return n(this,O),T(t)||null===t||j(t)&&0===t.length||x(t)&&!(t instanceof Date)&&0===Object.keys(t).length||E(t)&&isNaN(t)}.bind(void 0),P=(function(t){return n(this,O),!S(t)}.bind(void 0),function(t){return n(this,O),Array.isArray(t)}.bind(void 0)),C=function(t){return n(this,O),t&&!(null!=t&&t.nodeType)&&x(t)&&!P(t)}.bind(void 0);(function(t){return n(this,O),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return n(this,O),[].slice.call(t)}).bind(void 0);function k(t){for(var e=this,i=arguments.length,o=Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];if(!o.length||1===o.length&&!o[0])return t;const c=o.shift();return C(t)&&C(c)&&Object.keys(c).forEach(function(i){n(this,e);const o=c[i];C(o)?(t[i]||(t[i]={}),t[i]=k(t[i],o)):t[i]=P(o)?o.concat():o}.bind(this)),k.apply(void 0,[t].concat(o))}(function(t,e,i){void 0===i&&(i=1),n(this,O);const o=[],r=0|Math.max(0,Math.ceil((e-t)/i));for(let e=t;e<r;e++)o.push(t+e*i);return o}).bind(void 0),function(){var t=this;n(this,O);const e=function(){return n(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,o,r){void 0===r&&(r=e()),n(this,t),i.dispatchEvent(new MouseEvent(o,r))}.bind(this)}catch(i){return function(i,o,r){void 0===r&&(r=e()),n(this,t);const c=g.createEvent("MouseEvent");c.initMouseEvent(o,r.bubbles,r.cancelable,v,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(c)}.bind(this)}}.bind(void 0)(),function(t,e,i){n(this,O);const o=new Touch(k({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}.bind(void 0);function M(t,e){let n=t;for(const t in e)n=n.replace(new RegExp("{="+t+"}","g"),e[t]);return n}function _(t){var e=this;const i=this.config;let o,r,c;const s=function(){n(this,e);const t=r.shift();return t&&o&&x(o)&&t in o?(o=o[t],s()):t?void 0:o}.bind(this);Object.keys(i).forEach(function(l){n(this,e),o=t,r=l.split("_"),c=s(),$(c)&&(i[l]=c)}.bind(this)),this.api&&(this.state.orgConfig=t)}function q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function A(t){for(var n,i=1;i<arguments.length;i++)n=null!=arguments[i]?arguments[i]:{},i%2?q(Object(n),!0).forEach((function(i){var o,r,c;o=t,r=i,c=n[i],(r=e(r))in o?Object.defineProperty(o,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[r]=c})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}));return t}let D=function(t){var e,o;function r(e){var n=t.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new l,i(n)||i(n)}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,c(e,o);var s=r.prototype;return s.$beforeInit=function(){_.call(this,this.options)},s.$init=function(){var t;const e=this.config,n=e.class,i=e.selector,o=e.style;let r=document.querySelector(i||"."+(n||a));if(!r){const t=this.$$.$el.chart.node();r=document.createElement("table"),t.parentNode.insertBefore(r,t.nextSibling)}if("TABLE"!==r.tagName){const t=document.createElement("table");r.appendChild(t),r=t}if(o&&!document.getElementById(u)){const t=document.createElement("style");t.id=u,t.innerHTML=f,(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}(t=r.classList).add.apply(t,[o&&a,n].filter(Boolean)),this.element=r},s.generateTable=function(){var t=this;const e=this.$$,i=this.config,o=this.element,r=e.filterTargetsToShow(e.data.targets);let c=M(d,{title:r.length?this.config.categoryTitle:""}),s="";const l=[];r.forEach(function(e){var i=this;n(this,t),c+=M(d,{title:e.id}),e.values.forEach(function(t,e){n(this,i),l[e]||(l[e]=[t.x]),l[e].push(t.value)}.bind(this))}.bind(this)),l.forEach(function(e){var o=this;n(this,t),s+="<tr>"+e.map(function(t,e){return n(this,o),M(e?p:h,{value:0===e?i.categoryFormat.bind(this)(t):E(t)?t.toLocaleString():""})}.bind(this)).join("")+"</tr>"}.bind(this));const u=M(b,A(A({},i),{},{title:i.title||e.config.title_text||"",thead:c,tbody:s})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/gi,"");o.innerHTML=u},s.$redraw=function(){const t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},s.$willDestroy=function(){var t;if(null==(t=this.element.parentNode)||t.removeChild(this.element),1===this.$$.charts.length){var e;const t=document.getElementById(u);null==t||null==(e=t.parentNode)||e.removeChild(t)}},r}(s)}(),r=r.default}()}));
|