billboard.js 3.3.3 → 3.4.0
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/dist/billboard.css +19 -14
- package/dist/billboard.js +504 -112
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +550 -126
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +34 -18
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +34 -18
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +29 -15
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +29 -15
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +80 -32
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +80 -32
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +75 -29
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +75 -29
- package/dist/theme/datalab.css +24 -20
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +24 -20
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +24 -20
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +446 -99
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -5
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +8 -7
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +21 -21
- package/src/Chart/api/axis.ts +90 -25
- package/src/Chart/api/focus.ts +3 -2
- package/src/ChartInternal/Axis/Axis.ts +8 -6
- package/src/ChartInternal/ChartInternal.ts +48 -23
- package/src/ChartInternal/data/data.ts +1 -1
- package/src/ChartInternal/interactions/flow.ts +1 -1
- package/src/ChartInternal/internals/color.ts +4 -3
- package/src/ChartInternal/internals/format.ts +5 -1
- package/src/ChartInternal/internals/redraw.ts +3 -0
- package/src/ChartInternal/internals/text.ts +1 -1
- package/src/ChartInternal/internals/transform.ts +4 -1
- package/src/ChartInternal/internals/type.ts +5 -0
- package/src/ChartInternal/shape/arc.ts +41 -17
- package/src/ChartInternal/shape/bar.ts +1 -1
- package/src/ChartInternal/shape/point.ts +6 -3
- package/src/ChartInternal/shape/polar.ts +132 -0
- package/src/ChartInternal/shape/radar.ts +4 -4
- package/src/config/Options/common/main.ts +19 -2
- package/src/config/Options/data/data.ts +3 -0
- package/src/config/Options/shape/polar.ts +81 -0
- package/src/config/classes.ts +6 -3
- package/src/config/const.ts +3 -0
- package/src/config/resolver/shape.ts +4 -0
- package/src/core.ts +1 -0
- package/src/index.esm.ts +1 -0
- package/src/module/generator.ts +19 -5
- package/src/module/util.ts +22 -9
- package/src/scss/billboard.scss +13 -0
- package/src/scss/theme/datalab.scss +13 -0
- package/src/scss/theme/graph.scss +13 -0
- package/src/scss/theme/insight.scss +13 -0
- package/types/bb.d.ts +1 -0
- package/types/chart.d.ts +8 -8
- package/types/options.d.ts +79 -2
- package/types/types.d.ts +2 -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.4.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.textoverlap=t(e.d3,e.d3,e.d3,e.d3))}(this,(function(e,t,n,o){return function(){"use strict";var r={3:function(e){e.exports=o},12:function(t){t.exports=e},13:function(e){e.exports=t},1:function(e){e.exports=n}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var u={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}c.d(u,{default:function(){return d}});var n=c(12),o=c(13);c(1),c(3);var r="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")();r.requestIdleCallback=r.requestIdleCallback||function(e){return setTimeout(e,1)},r.cancelIdleCallback=r.cancelIdleCallback||function(e){return clearTimeout(e)};var i=null==r?void 0:r.document;var a=function(e){return void 0!==e},l=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var o=i.createEvent("MouseEvent");o.initMouseEvent(t,n.bubbles,n.cancelable,r,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(o)}}}();function s(e){var t,n,o,r=this.config,i=function(){var e=n.shift();return e&&t&&l(t)&&e in t?(t=t[e],i()):e?void 0:t};Object.keys(r).forEach((function(c){t=e,n=c.split("_"),o=i(),a(o)&&(r[c]=o)}))}var f=function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}();f.version="3.
|
|
12
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.textoverlap=t(e.d3,e.d3,e.d3,e.d3))}(this,(function(e,t,n,o){return function(){"use strict";var r={3:function(e){e.exports=o},12:function(t){t.exports=e},13:function(e){e.exports=t},1:function(e){e.exports=n}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var u={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}c.d(u,{default:function(){return d}});var n=c(12),o=c(13);c(1),c(3);var r="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")();r.requestIdleCallback=r.requestIdleCallback||function(e){return setTimeout(e,1)},r.cancelIdleCallback=r.cancelIdleCallback||function(e){return clearTimeout(e)};var i=null==r?void 0:r.document;var a=function(e){return void 0!==e},l=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var o=i.createEvent("MouseEvent");o.initMouseEvent(t,n.bubbles,n.cancelable,r,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(o)}}}();function s(e){var t,n,o,r=this.config,i=function(){var e=n.shift();return e&&t&&l(t)&&e in t?(t=t[e],i()):e?void 0:t};Object.keys(r).forEach((function(c){t=e,n=c.split("_"),o=i(),a(o)&&(r[c]=o)}))}var f=function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}();f.version="3.4.0";var b=function(){return{selector:void 0,extent:1,area:0}},d=function(r){var i,c;function u(t){var n=r.call(this,t)||this;return n.config=void 0,n.config=new b,e(n)||e(n)}c=r,(i=u).prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c);var a=u.prototype;return a.$init=function(){s.call(this,this.options)},a.$redraw=function(){var e=this.$$.$el,t=this.config.selector,n=t?e.main.selectAll(t):e.text;n.empty()||this.preventLabelOverlap(n)},a.generateVoronoi=function(e){var t=this.$$.scale,o=["x","y"].map((function(e){return t[e].domain()})),r=o[0],i=o[1],c=[i[0],r[1]];return r[1]=c[0],i[0]=c[1],n.Delaunay.from(e).voronoi([].concat(r,i))},a.preventLabelOverlap=function(e){var t=this.config,n=t.extent,r=t.area,i=e.data().map((function(e){return[e.index,e.value]})),c=this.generateVoronoi(i),u=0;e.each((function(){var e=c.cellPolygon(u);if(e&&this){var t=i[u],a=t[0],l=t[1],s=(0,o.polygonCentroid)(e),f=s[0],b=s[1],d=Math.abs((0,o.polygonArea)(e)),p=Math.round(Math.atan2(b-l,f-a)/Math.PI*2),v=n*(0===p?1:-1),h=-1===p?-n:n+5,y=1===Math.abs(p)?"middle":0===p?"start":"end";this.style.display=d<r?"none":"",this.setAttribute("text-anchor",y),this.setAttribute("dy","0."+(1===p?71:35)+"em"),this.setAttribute("transform","translate("+v+", "+h+")")}u++}))},u}(f)}(),u=u.default}()}));
|
|
@@ -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.4.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -17438,7 +17438,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
17438
17438
|
return Plugin;
|
|
17439
17439
|
}();
|
|
17440
17440
|
|
|
17441
|
-
Plugin.version = "3.
|
|
17441
|
+
Plugin.version = "3.4.0";
|
|
17442
17442
|
|
|
17443
17443
|
;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
|
|
17444
17444
|
|
|
@@ -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.4.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -17207,12 +17207,14 @@ var $GRID = {
|
|
|
17207
17207
|
ygridLines: "bb-ygrid-lines",
|
|
17208
17208
|
ygrids: "bb-ygrids"
|
|
17209
17209
|
};
|
|
17210
|
-
var $
|
|
17211
|
-
chartRadar: "bb-chart-radar",
|
|
17212
|
-
chartRadars: "bb-chart-radars",
|
|
17210
|
+
var $LEVEL = {
|
|
17213
17211
|
level: "bb-level",
|
|
17214
17212
|
levels: "bb-levels"
|
|
17215
17213
|
};
|
|
17214
|
+
var $RADAR = {
|
|
17215
|
+
chartRadar: "bb-chart-radar",
|
|
17216
|
+
chartRadars: "bb-chart-radars"
|
|
17217
|
+
};
|
|
17216
17218
|
var $REGION = {
|
|
17217
17219
|
region: "bb-region",
|
|
17218
17220
|
regions: "bb-regions"
|
|
@@ -17331,7 +17333,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
17331
17333
|
return Plugin;
|
|
17332
17334
|
}();
|
|
17333
17335
|
|
|
17334
|
-
Plugin.version = "3.
|
|
17336
|
+
Plugin.version = "3.4.0";
|
|
17335
17337
|
|
|
17336
17338
|
;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
|
|
17337
17339
|
/**
|
|
@@ -18635,15 +18637,15 @@ var _brighter = 1 / _darker;
|
|
|
18635
18637
|
|
|
18636
18638
|
|
|
18637
18639
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
18638
|
-
reN = "\\s*([+-]?\\d
|
|
18639
|
-
reP = "\\s*([+-]?\\d
|
|
18640
|
+
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
18641
|
+
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
18640
18642
|
reHex = /^#([0-9a-f]{3,8})$/,
|
|
18641
18643
|
reRgbInteger = new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),
|
|
18642
|
-
reRgbPercent = new RegExp("^rgb\\(\\s*([+-]?\\d
|
|
18643
|
-
reRgbaInteger = new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d
|
|
18644
|
-
reRgbaPercent = new RegExp("^rgba\\(\\s*([+-]?\\d
|
|
18645
|
-
reHslPercent = new RegExp("^hsl\\(\\s*([+-]?\\d
|
|
18646
|
-
reHslaPercent = new RegExp("^hsla\\(\\s*([+-]?\\d
|
|
18644
|
+
reRgbPercent = new RegExp("^rgb\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
|
|
18645
|
+
reRgbaInteger = new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
18646
|
+
reRgbaPercent = new RegExp("^rgba\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
18647
|
+
reHslPercent = new RegExp("^hsl\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
|
|
18648
|
+
reHslaPercent = new RegExp("^hsla\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
18647
18649
|
named = {
|
|
18648
18650
|
aliceblue: 0xf0f8ff,
|
|
18649
18651
|
antiquewhite: 0xfaebd7,
|
|
@@ -18804,6 +18806,7 @@ src_define(Color, color, {
|
|
|
18804
18806
|
hex: color_formatHex,
|
|
18805
18807
|
// Deprecated! Use color.formatHex.
|
|
18806
18808
|
formatHex: color_formatHex,
|
|
18809
|
+
formatHex8: color_formatHex8,
|
|
18807
18810
|
formatHsl: color_formatHsl,
|
|
18808
18811
|
formatRgb: color_formatRgb,
|
|
18809
18812
|
toString: color_formatRgb
|
|
@@ -18813,6 +18816,10 @@ function color_formatHex() {
|
|
|
18813
18816
|
return this.rgb().formatHex();
|
|
18814
18817
|
}
|
|
18815
18818
|
|
|
18819
|
+
function color_formatHex8() {
|
|
18820
|
+
return this.rgb().formatHex8();
|
|
18821
|
+
}
|
|
18822
|
+
|
|
18816
18823
|
function color_formatHsl() {
|
|
18817
18824
|
return hslConvert(this).formatHsl();
|
|
18818
18825
|
}
|
|
@@ -18875,12 +18882,16 @@ src_define(Rgb, color_rgb, extend(Color, {
|
|
|
18875
18882
|
rgb: function () {
|
|
18876
18883
|
return this;
|
|
18877
18884
|
},
|
|
18885
|
+
clamp: function clamp() {
|
|
18886
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
18887
|
+
},
|
|
18878
18888
|
displayable: function displayable() {
|
|
18879
18889
|
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
18880
18890
|
},
|
|
18881
18891
|
hex: rgb_formatHex,
|
|
18882
18892
|
// Deprecated! Use color.formatHex.
|
|
18883
18893
|
formatHex: rgb_formatHex,
|
|
18894
|
+
formatHex8: rgb_formatHex8,
|
|
18884
18895
|
formatRgb: rgb_formatRgb,
|
|
18885
18896
|
toString: rgb_formatRgb
|
|
18886
18897
|
}));
|
|
@@ -18889,14 +18900,25 @@ function rgb_formatHex() {
|
|
|
18889
18900
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
18890
18901
|
}
|
|
18891
18902
|
|
|
18903
|
+
function rgb_formatHex8() {
|
|
18904
|
+
return "#" + hex(this.r) + hex(this.g) + hex(this.b) + hex((isNaN(this.opacity) ? 1 : this.opacity) * 255);
|
|
18905
|
+
}
|
|
18906
|
+
|
|
18892
18907
|
function rgb_formatRgb() {
|
|
18893
|
-
var a = this.opacity;
|
|
18894
|
-
|
|
18895
|
-
|
|
18908
|
+
var a = clampa(this.opacity);
|
|
18909
|
+
return "" + (a === 1 ? "rgb(" : "rgba(") + clampi(this.r) + ", " + clampi(this.g) + ", " + clampi(this.b) + (a === 1 ? ")" : ", " + a + ")");
|
|
18910
|
+
}
|
|
18911
|
+
|
|
18912
|
+
function clampa(opacity) {
|
|
18913
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
18914
|
+
}
|
|
18915
|
+
|
|
18916
|
+
function clampi(value) {
|
|
18917
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
18896
18918
|
}
|
|
18897
18919
|
|
|
18898
18920
|
function hex(value) {
|
|
18899
|
-
value =
|
|
18921
|
+
value = clampi(value);
|
|
18900
18922
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
18901
18923
|
}
|
|
18902
18924
|
|
|
@@ -18958,17 +18980,29 @@ src_define(Hsl, hsl, extend(Color, {
|
|
|
18958
18980
|
m1 = 2 * l - m2;
|
|
18959
18981
|
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
18960
18982
|
},
|
|
18983
|
+
clamp: function clamp() {
|
|
18984
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
18985
|
+
},
|
|
18961
18986
|
displayable: function displayable() {
|
|
18962
18987
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
18963
18988
|
},
|
|
18964
18989
|
formatHsl: function formatHsl() {
|
|
18965
|
-
var a = this.opacity;
|
|
18966
|
-
|
|
18967
|
-
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
18990
|
+
var a = clampa(this.opacity);
|
|
18991
|
+
return "" + (a === 1 ? "hsl(" : "hsla(") + clamph(this.h) + ", " + clampt(this.s) * 100 + "%, " + clampt(this.l) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
18968
18992
|
}
|
|
18969
18993
|
}));
|
|
18994
|
+
|
|
18995
|
+
function clamph(value) {
|
|
18996
|
+
value = (value || 0) % 360;
|
|
18997
|
+
return value < 0 ? value + 360 : value;
|
|
18998
|
+
}
|
|
18999
|
+
|
|
19000
|
+
function clampt(value) {
|
|
19001
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
19002
|
+
}
|
|
18970
19003
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
18971
19004
|
|
|
19005
|
+
|
|
18972
19006
|
function hsl2rgb(h, m1, m2) {
|
|
18973
19007
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
18974
19008
|
}
|
|
@@ -21933,9 +21967,13 @@ function parseDate(date) {
|
|
|
21933
21967
|
if (date instanceof Date) {
|
|
21934
21968
|
parsedDate = date;
|
|
21935
21969
|
} else if (isString(date)) {
|
|
21936
|
-
var
|
|
21970
|
+
var _format$dataTime,
|
|
21971
|
+
config = this.config,
|
|
21937
21972
|
format = this.format;
|
|
21938
|
-
|
|
21973
|
+
|
|
21974
|
+
// if fails to parse, try by new Date()
|
|
21975
|
+
// https://github.com/naver/billboard.js/issues/1714
|
|
21976
|
+
parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
|
|
21939
21977
|
} else if (isNumber(date) && !isNaN(date)) {
|
|
21940
21978
|
parsedDate = new Date(+date);
|
|
21941
21979
|
}
|
|
@@ -21954,7 +21992,7 @@ function parseDate(date) {
|
|
|
21954
21992
|
|
|
21955
21993
|
|
|
21956
21994
|
function isTabVisible() {
|
|
21957
|
-
return !doc.
|
|
21995
|
+
return (doc == null ? void 0 : doc.hidden) === !1 || (doc == null ? void 0 : doc.visibilityState) === "visible";
|
|
21958
21996
|
}
|
|
21959
21997
|
/**
|
|
21960
21998
|
* Get the current input type
|
|
@@ -21966,26 +22004,36 @@ function isTabVisible() {
|
|
|
21966
22004
|
|
|
21967
22005
|
|
|
21968
22006
|
function convertInputType(mouse, touch) {
|
|
21969
|
-
var
|
|
22007
|
+
var DocumentTouch = win.DocumentTouch,
|
|
22008
|
+
matchMedia = win.matchMedia,
|
|
22009
|
+
navigator = win.navigator,
|
|
22010
|
+
hasTouch = !1;
|
|
21970
22011
|
|
|
21971
22012
|
if (touch) {
|
|
21972
22013
|
// Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
|
|
21973
|
-
if (
|
|
21974
|
-
hasTouch =
|
|
22014
|
+
if (navigator && "maxTouchPoints" in navigator) {
|
|
22015
|
+
hasTouch = navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
|
|
21975
22016
|
// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
|
|
21976
|
-
} else if ("ontouchmove" in win ||
|
|
22017
|
+
} else if ("ontouchmove" in win || DocumentTouch && doc instanceof DocumentTouch) {
|
|
21977
22018
|
hasTouch = !0;
|
|
21978
22019
|
} else {
|
|
21979
22020
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
|
|
21980
|
-
|
|
21981
|
-
|
|
21982
|
-
|
|
21983
|
-
|
|
22021
|
+
if (matchMedia != null && matchMedia("(pointer:coarse)").matches) {
|
|
22022
|
+
hasTouch = !0;
|
|
22023
|
+
} else {
|
|
22024
|
+
// Only as a last resort, fall back to user agent sniffing
|
|
22025
|
+
var UA = navigator.userAgent;
|
|
22026
|
+
hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
|
|
21984
22027
|
}
|
|
21985
22028
|
}
|
|
21986
|
-
}
|
|
22029
|
+
} // Check if agent has mouse using any-hover, touch devices (e.g iPad) with external mouse will return true as long as mouse is connected
|
|
22030
|
+
// https://css-tricks.com/interaction-media-features-and-their-potential-for-incorrect-assumptions/#aa-testing-the-capabilities-of-all-inputs
|
|
22031
|
+
// Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
|
|
22032
|
+
|
|
21987
22033
|
|
|
21988
|
-
var hasMouse = mouse &&
|
|
22034
|
+
var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
|
|
22035
|
+
return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
|
|
22036
|
+
});
|
|
21989
22037
|
return hasMouse && "mouse" || hasTouch && "touch" || null;
|
|
21990
22038
|
}
|
|
21991
22039
|
;// CONCATENATED MODULE: ./src/config/config.ts
|
|
@@ -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.4.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -17097,15 +17097,15 @@ var _brighter = 1 / _darker;
|
|
|
17097
17097
|
|
|
17098
17098
|
|
|
17099
17099
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
17100
|
-
reN = "\\s*([+-]?\\d
|
|
17101
|
-
reP = "\\s*([+-]?\\d
|
|
17100
|
+
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
17101
|
+
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
17102
17102
|
reHex = /^#([0-9a-f]{3,8})$/,
|
|
17103
17103
|
reRgbInteger = new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),
|
|
17104
|
-
reRgbPercent = new RegExp("^rgb\\(\\s*([+-]?\\d
|
|
17105
|
-
reRgbaInteger = new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d
|
|
17106
|
-
reRgbaPercent = new RegExp("^rgba\\(\\s*([+-]?\\d
|
|
17107
|
-
reHslPercent = new RegExp("^hsl\\(\\s*([+-]?\\d
|
|
17108
|
-
reHslaPercent = new RegExp("^hsla\\(\\s*([+-]?\\d
|
|
17104
|
+
reRgbPercent = new RegExp("^rgb\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
|
|
17105
|
+
reRgbaInteger = new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
17106
|
+
reRgbaPercent = new RegExp("^rgba\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
17107
|
+
reHslPercent = new RegExp("^hsl\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),
|
|
17108
|
+
reHslaPercent = new RegExp("^hsla\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),
|
|
17109
17109
|
named = {
|
|
17110
17110
|
aliceblue: 0xf0f8ff,
|
|
17111
17111
|
antiquewhite: 0xfaebd7,
|
|
@@ -17266,6 +17266,7 @@ src_define(Color, color, {
|
|
|
17266
17266
|
hex: color_formatHex,
|
|
17267
17267
|
// Deprecated! Use color.formatHex.
|
|
17268
17268
|
formatHex: color_formatHex,
|
|
17269
|
+
formatHex8: color_formatHex8,
|
|
17269
17270
|
formatHsl: color_formatHsl,
|
|
17270
17271
|
formatRgb: color_formatRgb,
|
|
17271
17272
|
toString: color_formatRgb
|
|
@@ -17275,6 +17276,10 @@ function color_formatHex() {
|
|
|
17275
17276
|
return this.rgb().formatHex();
|
|
17276
17277
|
}
|
|
17277
17278
|
|
|
17279
|
+
function color_formatHex8() {
|
|
17280
|
+
return this.rgb().formatHex8();
|
|
17281
|
+
}
|
|
17282
|
+
|
|
17278
17283
|
function color_formatHsl() {
|
|
17279
17284
|
return hslConvert(this).formatHsl();
|
|
17280
17285
|
}
|
|
@@ -17337,12 +17342,16 @@ src_define(Rgb, color_rgb, extend(Color, {
|
|
|
17337
17342
|
rgb: function () {
|
|
17338
17343
|
return this;
|
|
17339
17344
|
},
|
|
17345
|
+
clamp: function clamp() {
|
|
17346
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
17347
|
+
},
|
|
17340
17348
|
displayable: function displayable() {
|
|
17341
17349
|
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
17342
17350
|
},
|
|
17343
17351
|
hex: rgb_formatHex,
|
|
17344
17352
|
// Deprecated! Use color.formatHex.
|
|
17345
17353
|
formatHex: rgb_formatHex,
|
|
17354
|
+
formatHex8: rgb_formatHex8,
|
|
17346
17355
|
formatRgb: rgb_formatRgb,
|
|
17347
17356
|
toString: rgb_formatRgb
|
|
17348
17357
|
}));
|
|
@@ -17351,14 +17360,25 @@ function rgb_formatHex() {
|
|
|
17351
17360
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
17352
17361
|
}
|
|
17353
17362
|
|
|
17363
|
+
function rgb_formatHex8() {
|
|
17364
|
+
return "#" + hex(this.r) + hex(this.g) + hex(this.b) + hex((isNaN(this.opacity) ? 1 : this.opacity) * 255);
|
|
17365
|
+
}
|
|
17366
|
+
|
|
17354
17367
|
function rgb_formatRgb() {
|
|
17355
|
-
var a = this.opacity;
|
|
17356
|
-
|
|
17357
|
-
|
|
17368
|
+
var a = clampa(this.opacity);
|
|
17369
|
+
return "" + (a === 1 ? "rgb(" : "rgba(") + clampi(this.r) + ", " + clampi(this.g) + ", " + clampi(this.b) + (a === 1 ? ")" : ", " + a + ")");
|
|
17370
|
+
}
|
|
17371
|
+
|
|
17372
|
+
function clampa(opacity) {
|
|
17373
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
17374
|
+
}
|
|
17375
|
+
|
|
17376
|
+
function clampi(value) {
|
|
17377
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
17358
17378
|
}
|
|
17359
17379
|
|
|
17360
17380
|
function hex(value) {
|
|
17361
|
-
value =
|
|
17381
|
+
value = clampi(value);
|
|
17362
17382
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
17363
17383
|
}
|
|
17364
17384
|
|
|
@@ -17420,17 +17440,29 @@ src_define(Hsl, hsl, extend(Color, {
|
|
|
17420
17440
|
m1 = 2 * l - m2;
|
|
17421
17441
|
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
17422
17442
|
},
|
|
17443
|
+
clamp: function clamp() {
|
|
17444
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
17445
|
+
},
|
|
17423
17446
|
displayable: function displayable() {
|
|
17424
17447
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
17425
17448
|
},
|
|
17426
17449
|
formatHsl: function formatHsl() {
|
|
17427
|
-
var a = this.opacity;
|
|
17428
|
-
|
|
17429
|
-
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
17450
|
+
var a = clampa(this.opacity);
|
|
17451
|
+
return "" + (a === 1 ? "hsl(" : "hsla(") + clamph(this.h) + ", " + clampt(this.s) * 100 + "%, " + clampt(this.l) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
17430
17452
|
}
|
|
17431
17453
|
}));
|
|
17454
|
+
|
|
17455
|
+
function clamph(value) {
|
|
17456
|
+
value = (value || 0) % 360;
|
|
17457
|
+
return value < 0 ? value + 360 : value;
|
|
17458
|
+
}
|
|
17459
|
+
|
|
17460
|
+
function clampt(value) {
|
|
17461
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
17462
|
+
}
|
|
17432
17463
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
17433
17464
|
|
|
17465
|
+
|
|
17434
17466
|
function hsl2rgb(h, m1, m2) {
|
|
17435
17467
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
17436
17468
|
}
|
|
@@ -19106,12 +19138,14 @@ var $GRID = {
|
|
|
19106
19138
|
ygridLines: "bb-ygrid-lines",
|
|
19107
19139
|
ygrids: "bb-ygrids"
|
|
19108
19140
|
};
|
|
19109
|
-
var $
|
|
19110
|
-
chartRadar: "bb-chart-radar",
|
|
19111
|
-
chartRadars: "bb-chart-radars",
|
|
19141
|
+
var $LEVEL = {
|
|
19112
19142
|
level: "bb-level",
|
|
19113
19143
|
levels: "bb-levels"
|
|
19114
19144
|
};
|
|
19145
|
+
var $RADAR = {
|
|
19146
|
+
chartRadar: "bb-chart-radar",
|
|
19147
|
+
chartRadars: "bb-chart-radars"
|
|
19148
|
+
};
|
|
19115
19149
|
var $REGION = {
|
|
19116
19150
|
region: "bb-region",
|
|
19117
19151
|
regions: "bb-regions"
|
|
@@ -23057,9 +23091,13 @@ function parseDate(date) {
|
|
|
23057
23091
|
if (date instanceof Date) {
|
|
23058
23092
|
parsedDate = date;
|
|
23059
23093
|
} else if (isString(date)) {
|
|
23060
|
-
var
|
|
23094
|
+
var _format$dataTime,
|
|
23095
|
+
config = this.config,
|
|
23061
23096
|
format = this.format;
|
|
23062
|
-
|
|
23097
|
+
|
|
23098
|
+
// if fails to parse, try by new Date()
|
|
23099
|
+
// https://github.com/naver/billboard.js/issues/1714
|
|
23100
|
+
parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
|
|
23063
23101
|
} else if (isNumber(date) && !isNaN(date)) {
|
|
23064
23102
|
parsedDate = new Date(+date);
|
|
23065
23103
|
}
|
|
@@ -23078,7 +23116,7 @@ function parseDate(date) {
|
|
|
23078
23116
|
|
|
23079
23117
|
|
|
23080
23118
|
function isTabVisible() {
|
|
23081
|
-
return !doc.
|
|
23119
|
+
return (doc == null ? void 0 : doc.hidden) === !1 || (doc == null ? void 0 : doc.visibilityState) === "visible";
|
|
23082
23120
|
}
|
|
23083
23121
|
/**
|
|
23084
23122
|
* Get the current input type
|
|
@@ -23090,26 +23128,36 @@ function isTabVisible() {
|
|
|
23090
23128
|
|
|
23091
23129
|
|
|
23092
23130
|
function convertInputType(mouse, touch) {
|
|
23093
|
-
var
|
|
23131
|
+
var DocumentTouch = win.DocumentTouch,
|
|
23132
|
+
matchMedia = win.matchMedia,
|
|
23133
|
+
navigator = win.navigator,
|
|
23134
|
+
hasTouch = !1;
|
|
23094
23135
|
|
|
23095
23136
|
if (touch) {
|
|
23096
23137
|
// Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
|
|
23097
|
-
if (
|
|
23098
|
-
hasTouch =
|
|
23138
|
+
if (navigator && "maxTouchPoints" in navigator) {
|
|
23139
|
+
hasTouch = navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
|
|
23099
23140
|
// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
|
|
23100
|
-
} else if ("ontouchmove" in win ||
|
|
23141
|
+
} else if ("ontouchmove" in win || DocumentTouch && doc instanceof DocumentTouch) {
|
|
23101
23142
|
hasTouch = !0;
|
|
23102
23143
|
} else {
|
|
23103
23144
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23145
|
+
if (matchMedia != null && matchMedia("(pointer:coarse)").matches) {
|
|
23146
|
+
hasTouch = !0;
|
|
23147
|
+
} else {
|
|
23148
|
+
// Only as a last resort, fall back to user agent sniffing
|
|
23149
|
+
var UA = navigator.userAgent;
|
|
23150
|
+
hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
|
|
23108
23151
|
}
|
|
23109
23152
|
}
|
|
23110
|
-
}
|
|
23153
|
+
} // Check if agent has mouse using any-hover, touch devices (e.g iPad) with external mouse will return true as long as mouse is connected
|
|
23154
|
+
// https://css-tricks.com/interaction-media-features-and-their-potential-for-incorrect-assumptions/#aa-testing-the-capabilities-of-all-inputs
|
|
23155
|
+
// Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
|
|
23156
|
+
|
|
23111
23157
|
|
|
23112
|
-
var hasMouse = mouse &&
|
|
23158
|
+
var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
|
|
23159
|
+
return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
|
|
23160
|
+
});
|
|
23113
23161
|
return hasMouse && "mouse" || hasTouch && "touch" || null;
|
|
23114
23162
|
}
|
|
23115
23163
|
;// CONCATENATED MODULE: ./src/config/config.ts
|
|
@@ -23235,7 +23283,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
23235
23283
|
return Plugin;
|
|
23236
23284
|
}();
|
|
23237
23285
|
|
|
23238
|
-
Plugin.version = "3.
|
|
23286
|
+
Plugin.version = "3.4.0";
|
|
23239
23287
|
|
|
23240
23288
|
;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts
|
|
23241
23289
|
/**
|