billboard.js 3.6.0-next.2 → 3.6.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.
Files changed (41) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +424 -237
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +538 -351
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +116 -116
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +116 -116
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +116 -116
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +116 -116
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +116 -116
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +342 -168
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +5 -5
  35. package/src/ChartInternal/internals/color.ts +50 -0
  36. package/src/ChartInternal/internals/legend.ts +246 -145
  37. package/src/ChartInternal/shape/area.ts +9 -38
  38. package/src/ChartInternal/shape/bar.ts +20 -3
  39. package/src/config/Options/common/legend.ts +18 -3
  40. package/src/config/Options/shape/bar.ts +32 -0
  41. package/types/options.d.ts +23 -4
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.0-next.2
8
+ * @version 3.6.0
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
11
  * - d3-axis ^3.0.0
@@ -628,7 +628,7 @@ var check = function (it) {
628
628
 
629
629
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
630
630
  module.exports =
631
- // eslint-disable-next-line es-x/no-global-this -- safe
631
+ // eslint-disable-next-line es/no-global-this -- safe
632
632
  check(typeof globalThis == 'object' && globalThis) ||
633
633
  check(typeof window == 'object' && window) ||
634
634
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -651,7 +651,7 @@ var toPropertyKey = __webpack_require__(18);
651
651
  var hasOwn = __webpack_require__(39);
652
652
  var IE8_DOM_DEFINE = __webpack_require__(42);
653
653
 
654
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
654
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
655
655
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
656
656
 
657
657
  // `Object.getOwnPropertyDescriptor` method
@@ -674,7 +674,7 @@ var fails = __webpack_require__(7);
674
674
 
675
675
  // Detect IE8's incomplete defineProperty implementation
676
676
  module.exports = !fails(function () {
677
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
677
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
678
678
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
679
679
  });
680
680
 
@@ -712,7 +712,7 @@ module.exports = NATIVE_BIND ? call.bind(call) : function () {
712
712
  var fails = __webpack_require__(7);
713
713
 
714
714
  module.exports = !fails(function () {
715
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
715
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
716
716
  var test = (function () { /* empty */ }).bind();
717
717
  // eslint-disable-next-line no-prototype-builtins -- safe
718
718
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -726,7 +726,7 @@ module.exports = !fails(function () {
726
726
  "use strict";
727
727
 
728
728
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
729
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
729
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
730
730
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
731
731
 
732
732
  // Nashorn ~ JDK8 bug
@@ -991,7 +991,7 @@ module.exports = uncurryThis({}.isPrototypeOf);
991
991
  /* 26 */
992
992
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
993
993
 
994
- /* eslint-disable es-x/no-symbol -- required for testing */
994
+ /* eslint-disable es/no-symbol -- required for testing */
995
995
  var NATIVE_SYMBOL = __webpack_require__(27);
996
996
 
997
997
  module.exports = NATIVE_SYMBOL
@@ -1003,11 +1003,11 @@ module.exports = NATIVE_SYMBOL
1003
1003
  /* 27 */
1004
1004
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1005
1005
 
1006
- /* eslint-disable es-x/no-symbol -- required for testing */
1006
+ /* eslint-disable es/no-symbol -- required for testing */
1007
1007
  var V8_VERSION = __webpack_require__(28);
1008
1008
  var fails = __webpack_require__(7);
1009
1009
 
1010
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
1010
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
1011
1011
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
1012
1012
  var symbol = Symbol();
1013
1013
  // Chrome 38 Symbol has incorrect toString conversion
@@ -1167,10 +1167,10 @@ var store = __webpack_require__(37);
1167
1167
  (module.exports = function (key, value) {
1168
1168
  return store[key] || (store[key] = value !== undefined ? value : {});
1169
1169
  })('versions', []).push({
1170
- version: '3.25.2',
1170
+ version: '3.25.3',
1171
1171
  mode: IS_PURE ? 'pure' : 'global',
1172
1172
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
1173
- license: 'https://github.com/zloirock/core-js/blob/v3.25.2/LICENSE',
1173
+ license: 'https://github.com/zloirock/core-js/blob/v3.25.3/LICENSE',
1174
1174
  source: 'https://github.com/zloirock/core-js'
1175
1175
  });
1176
1176
 
@@ -1201,7 +1201,7 @@ module.exports = store;
1201
1201
 
1202
1202
  var global = __webpack_require__(4);
1203
1203
 
1204
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
1204
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
1205
1205
  var defineProperty = Object.defineProperty;
1206
1206
 
1207
1207
  module.exports = function (key, value) {
@@ -1224,7 +1224,7 @@ var hasOwnProperty = uncurryThis({}.hasOwnProperty);
1224
1224
 
1225
1225
  // `HasOwnProperty` abstract operation
1226
1226
  // https://tc39.es/ecma262/#sec-hasownproperty
1227
- // eslint-disable-next-line es-x/no-object-hasown -- safe
1227
+ // eslint-disable-next-line es/no-object-hasown -- safe
1228
1228
  module.exports = Object.hasOwn || function hasOwn(it, key) {
1229
1229
  return hasOwnProperty(toObject(it), key);
1230
1230
  };
@@ -1270,7 +1270,7 @@ var createElement = __webpack_require__(43);
1270
1270
 
1271
1271
  // Thanks to IE8 for its funny defineProperty
1272
1272
  module.exports = !DESCRIPTORS && !fails(function () {
1273
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1273
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1274
1274
  return Object.defineProperty(createElement('div'), 'a', {
1275
1275
  get: function () { return 7; }
1276
1276
  }).a != 7;
@@ -1320,9 +1320,9 @@ var anObject = __webpack_require__(47);
1320
1320
  var toPropertyKey = __webpack_require__(18);
1321
1321
 
1322
1322
  var $TypeError = TypeError;
1323
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
1323
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
1324
1324
  var $defineProperty = Object.defineProperty;
1325
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1325
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1326
1326
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1327
1327
  var ENUMERABLE = 'enumerable';
1328
1328
  var CONFIGURABLE = 'configurable';
@@ -1368,7 +1368,7 @@ var fails = __webpack_require__(7);
1368
1368
  // V8 ~ Chrome 36-
1369
1369
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
1370
1370
  module.exports = DESCRIPTORS && fails(function () {
1371
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1371
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1372
1372
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
1373
1373
  value: 42,
1374
1374
  writable: false
@@ -1439,7 +1439,7 @@ var InternalStateModule = __webpack_require__(52);
1439
1439
 
1440
1440
  var enforceInternalState = InternalStateModule.enforce;
1441
1441
  var getInternalState = InternalStateModule.get;
1442
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
1442
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
1443
1443
  var defineProperty = Object.defineProperty;
1444
1444
 
1445
1445
  var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
@@ -1488,7 +1488,7 @@ var DESCRIPTORS = __webpack_require__(6);
1488
1488
  var hasOwn = __webpack_require__(39);
1489
1489
 
1490
1490
  var FunctionPrototype = Function.prototype;
1491
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1491
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1492
1492
  var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
1493
1493
 
1494
1494
  var EXISTS = hasOwn(FunctionPrototype, 'name');
@@ -1684,7 +1684,7 @@ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1684
1684
 
1685
1685
  // `Object.getOwnPropertyNames` method
1686
1686
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
1687
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
1687
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1688
1688
  exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1689
1689
  return internalObjectKeys(O, hiddenKeys);
1690
1690
  };
@@ -1796,7 +1796,7 @@ var floor = Math.floor;
1796
1796
 
1797
1797
  // `Math.trunc` method
1798
1798
  // https://tc39.es/ecma262/#sec-math.trunc
1799
- // eslint-disable-next-line es-x/no-math-trunc -- safe
1799
+ // eslint-disable-next-line es/no-math-trunc -- safe
1800
1800
  module.exports = Math.trunc || function trunc(x) {
1801
1801
  var n = +x;
1802
1802
  return (n > 0 ? floor : ceil)(n);
@@ -1851,7 +1851,7 @@ module.exports = [
1851
1851
  /* 67 */
1852
1852
  /***/ (function(__unused_webpack_module, exports) {
1853
1853
 
1854
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
1854
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1855
1855
  exports.f = Object.getOwnPropertySymbols;
1856
1856
 
1857
1857
 
@@ -2021,7 +2021,7 @@ hiddenKeys[IE_PROTO] = true;
2021
2021
 
2022
2022
  // `Object.create` method
2023
2023
  // https://tc39.es/ecma262/#sec-object.create
2024
- // eslint-disable-next-line es-x/no-object-create -- safe
2024
+ // eslint-disable-next-line es/no-object-create -- safe
2025
2025
  module.exports = Object.create || function create(O, Properties) {
2026
2026
  var result;
2027
2027
  if (O !== null) {
@@ -2048,7 +2048,7 @@ var objectKeys = __webpack_require__(74);
2048
2048
 
2049
2049
  // `Object.defineProperties` method
2050
2050
  // https://tc39.es/ecma262/#sec-object.defineproperties
2051
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
2051
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
2052
2052
  exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2053
2053
  anObject(O);
2054
2054
  var props = toIndexedObject(Properties);
@@ -2070,7 +2070,7 @@ var enumBugKeys = __webpack_require__(66);
2070
2070
 
2071
2071
  // `Object.keys` method
2072
2072
  // https://tc39.es/ecma262/#sec-object.keys
2073
- // eslint-disable-next-line es-x/no-object-keys -- safe
2073
+ // eslint-disable-next-line es/no-object-keys -- safe
2074
2074
  module.exports = Object.keys || function keys(O) {
2075
2075
  return internalObjectKeys(O, enumBugKeys);
2076
2076
  };
@@ -2089,7 +2089,7 @@ module.exports = getBuiltIn('document', 'documentElement');
2089
2089
  /* 76 */
2090
2090
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2091
2091
 
2092
- /* eslint-disable es-x/no-object-getownpropertynames -- safe */
2092
+ /* eslint-disable es/no-object-getownpropertynames -- safe */
2093
2093
  var classof = __webpack_require__(15);
2094
2094
  var toIndexedObject = __webpack_require__(12);
2095
2095
  var $getOwnPropertyNames = (__webpack_require__(58).f);
@@ -2379,7 +2379,7 @@ var classof = __webpack_require__(15);
2379
2379
 
2380
2380
  // `IsArray` abstract operation
2381
2381
  // https://tc39.es/ecma262/#sec-isarray
2382
- // eslint-disable-next-line es-x/no-array-isarray -- safe
2382
+ // eslint-disable-next-line es/no-array-isarray -- safe
2383
2383
  module.exports = Array.isArray || function isArray(argument) {
2384
2384
  return classof(argument) == 'Array';
2385
2385
  };
@@ -2477,7 +2477,7 @@ $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
2477
2477
 
2478
2478
  var NATIVE_SYMBOL = __webpack_require__(27);
2479
2479
 
2480
- /* eslint-disable es-x/no-symbol -- safe */
2480
+ /* eslint-disable es/no-symbol -- safe */
2481
2481
  module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;
2482
2482
 
2483
2483
 
@@ -2592,7 +2592,7 @@ var FunctionPrototype = Function.prototype;
2592
2592
  var apply = FunctionPrototype.apply;
2593
2593
  var call = FunctionPrototype.call;
2594
2594
 
2595
- // eslint-disable-next-line es-x/no-reflect -- safe
2595
+ // eslint-disable-next-line es/no-reflect -- safe
2596
2596
  module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
2597
2597
  return call.apply(apply, arguments);
2598
2598
  });
@@ -2998,13 +2998,13 @@ var aPossiblePrototype = __webpack_require__(114);
2998
2998
  // `Object.setPrototypeOf` method
2999
2999
  // https://tc39.es/ecma262/#sec-object.setprototypeof
3000
3000
  // Works with __proto__ only. Old v8 can't work with null proto objects.
3001
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
3001
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
3002
3002
  module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
3003
3003
  var CORRECT_SETTER = false;
3004
3004
  var test = {};
3005
3005
  var setter;
3006
3006
  try {
3007
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
3007
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3008
3008
  setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
3009
3009
  setter(test, []);
3010
3010
  CORRECT_SETTER = test instanceof Array;
@@ -3130,7 +3130,7 @@ var createPropertyDescriptor = __webpack_require__(11);
3130
3130
  module.exports = !fails(function () {
3131
3131
  var error = Error('a');
3132
3132
  if (!('stack' in error)) return true;
3133
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
3133
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
3134
3134
  Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
3135
3135
  return error.stack !== 7;
3136
3136
  });
@@ -3169,7 +3169,7 @@ var nativeErrorToString = Error.prototype.toString;
3169
3169
  var INCORRECT_TO_STRING = fails(function () {
3170
3170
  if (DESCRIPTORS) {
3171
3171
  // Chrome 32- incorrectly call accessor
3172
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
3172
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
3173
3173
  var object = create(Object.defineProperty({}, 'name', { get: function () {
3174
3174
  return this === object;
3175
3175
  } }));
@@ -3273,7 +3273,7 @@ var ObjectPrototype = $Object.prototype;
3273
3273
 
3274
3274
  // `Object.getPrototypeOf` method
3275
3275
  // https://tc39.es/ecma262/#sec-object.getprototypeof
3276
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
3276
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
3277
3277
  module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
3278
3278
  var object = toObject(O);
3279
3279
  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
@@ -3293,7 +3293,7 @@ var fails = __webpack_require__(7);
3293
3293
  module.exports = !fails(function () {
3294
3294
  function F() { /* empty */ }
3295
3295
  F.prototype.constructor = null;
3296
- // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
3296
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
3297
3297
  return Object.getPrototypeOf(new F()) !== F.prototype;
3298
3298
  });
3299
3299
 
@@ -3681,7 +3681,7 @@ var min = Math.min;
3681
3681
 
3682
3682
  // `Array.prototype.copyWithin` method implementation
3683
3683
  // https://tc39.es/ecma262/#sec-array.prototype.copywithin
3684
- // eslint-disable-next-line es-x/no-array-prototype-copywithin -- safe
3684
+ // eslint-disable-next-line es/no-array-prototype-copywithin -- safe
3685
3685
  module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
3686
3686
  var O = toObject(this);
3687
3687
  var len = lengthOfArrayLike(O);
@@ -4066,7 +4066,7 @@ var forEach = __webpack_require__(156);
4066
4066
 
4067
4067
  // `Array.prototype.forEach` method
4068
4068
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
4069
- // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
4069
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
4070
4070
  $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
4071
4071
  forEach: forEach
4072
4072
  });
@@ -4087,7 +4087,7 @@ var STRICT_METHOD = arrayMethodIsStrict('forEach');
4087
4087
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
4088
4088
  module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
4089
4089
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
4090
- // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
4090
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
4091
4091
  } : [].forEach;
4092
4092
 
4093
4093
 
@@ -4100,7 +4100,7 @@ var from = __webpack_require__(158);
4100
4100
  var checkCorrectnessOfIteration = __webpack_require__(160);
4101
4101
 
4102
4102
  var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
4103
- // eslint-disable-next-line es-x/no-array-from -- required for testing
4103
+ // eslint-disable-next-line es/no-array-from -- required for testing
4104
4104
  Array.from(iterable);
4105
4105
  });
4106
4106
 
@@ -4203,7 +4203,7 @@ try {
4203
4203
  iteratorWithReturn[ITERATOR] = function () {
4204
4204
  return this;
4205
4205
  };
4206
- // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
4206
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
4207
4207
  Array.from(iteratorWithReturn, function () { throw 2; });
4208
4208
  } catch (error) { /* empty */ }
4209
4209
 
@@ -4259,7 +4259,7 @@ addToUnscopables('includes');
4259
4259
 
4260
4260
  "use strict";
4261
4261
 
4262
- /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
4262
+ /* eslint-disable es/no-array-prototype-indexof -- required for testing */
4263
4263
  var $ = __webpack_require__(3);
4264
4264
  var uncurryThis = __webpack_require__(14);
4265
4265
  var $indexOf = (__webpack_require__(60).indexOf);
@@ -4517,7 +4517,7 @@ var BUGGY_SAFARI_ITERATORS = false;
4517
4517
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
4518
4518
  var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
4519
4519
 
4520
- /* eslint-disable es-x/no-array-prototype-keys -- safe */
4520
+ /* eslint-disable es/no-array-prototype-keys -- safe */
4521
4521
  if ([].keys) {
4522
4522
  arrayIterator = [].keys();
4523
4523
  // Safari 8 has buggy iterators w/o `next`
@@ -4597,7 +4597,7 @@ var lastIndexOf = __webpack_require__(171);
4597
4597
 
4598
4598
  // `Array.prototype.lastIndexOf` method
4599
4599
  // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
4600
- // eslint-disable-next-line es-x/no-array-prototype-lastindexof -- required for testing
4600
+ // eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing
4601
4601
  $({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
4602
4602
  lastIndexOf: lastIndexOf
4603
4603
  });
@@ -4609,7 +4609,7 @@ $({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
4609
4609
 
4610
4610
  "use strict";
4611
4611
 
4612
- /* eslint-disable es-x/no-array-prototype-lastindexof -- safe */
4612
+ /* eslint-disable es/no-array-prototype-lastindexof -- safe */
4613
4613
  var apply = __webpack_require__(94);
4614
4614
  var toIndexedObject = __webpack_require__(12);
4615
4615
  var toIntegerOrInfinity = __webpack_require__(62);
@@ -4674,7 +4674,7 @@ var $Array = Array;
4674
4674
 
4675
4675
  var ISNT_GENERIC = fails(function () {
4676
4676
  function F() { /* empty */ }
4677
- // eslint-disable-next-line es-x/no-array-of -- safe
4677
+ // eslint-disable-next-line es/no-array-of -- safe
4678
4678
  return !($Array.of.call(F) instanceof F);
4679
4679
  });
4680
4680
 
@@ -4714,7 +4714,7 @@ var INCORRECT_TO_LENGTH = fails(function () {
4714
4714
  // https://bugs.chromium.org/p/v8/issues/detail?id=12681
4715
4715
  var SILENT_ON_NON_WRITABLE_LENGTH = !function () {
4716
4716
  try {
4717
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
4717
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
4718
4718
  Object.defineProperty([], 'length', { writable: false }).push();
4719
4719
  } catch (error) {
4720
4720
  return error instanceof TypeError;
@@ -4750,7 +4750,7 @@ var DESCRIPTORS = __webpack_require__(6);
4750
4750
  var isArray = __webpack_require__(88);
4751
4751
 
4752
4752
  var $TypeError = TypeError;
4753
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
4753
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
4754
4754
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4755
4755
 
4756
4756
  // Safari < 13 does not throw an error in this case
@@ -4758,7 +4758,7 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
4758
4758
  // makes no sense without proper strict mode support
4759
4759
  if (this !== undefined) return true;
4760
4760
  try {
4761
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
4761
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
4762
4762
  Object.defineProperty([], 'length', { writable: false }).length = 1;
4763
4763
  } catch (error) {
4764
4764
  return error instanceof TypeError;
@@ -5336,7 +5336,7 @@ var INCORRECT_RESULT = [].unshift(0) !== 1;
5336
5336
  // V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
5337
5337
  var SILENT_ON_NON_WRITABLE_LENGTH = !function () {
5338
5338
  try {
5339
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
5339
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
5340
5340
  Object.defineProperty([], 'length', { writable: false }).unshift();
5341
5341
  } catch (error) {
5342
5342
  return error instanceof TypeError;
@@ -5649,7 +5649,7 @@ module.exports = {
5649
5649
  /* 196 */
5650
5650
  /***/ (function(module) {
5651
5651
 
5652
- // eslint-disable-next-line es-x/no-typed-arrays -- safe
5652
+ // eslint-disable-next-line es/no-typed-arrays -- safe
5653
5653
  module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
5654
5654
 
5655
5655
 
@@ -6865,7 +6865,7 @@ var isObject = __webpack_require__(20);
6865
6865
  var classof = __webpack_require__(15);
6866
6866
  var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(232);
6867
6867
 
6868
- // eslint-disable-next-line es-x/no-object-isextensible -- safe
6868
+ // eslint-disable-next-line es/no-object-isextensible -- safe
6869
6869
  var $isExtensible = Object.isExtensible;
6870
6870
  var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
6871
6871
 
@@ -6888,7 +6888,7 @@ var fails = __webpack_require__(7);
6888
6888
  module.exports = fails(function () {
6889
6889
  if (typeof ArrayBuffer == 'function') {
6890
6890
  var buffer = new ArrayBuffer(8);
6891
- // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-defineproperty -- safe
6891
+ // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
6892
6892
  if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
6893
6893
  }
6894
6894
  });
@@ -6901,7 +6901,7 @@ module.exports = fails(function () {
6901
6901
  var fails = __webpack_require__(7);
6902
6902
 
6903
6903
  module.exports = !fails(function () {
6904
- // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-preventextensions -- required for testing
6904
+ // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
6905
6905
  return Object.isExtensible(Object.preventExtensions({}));
6906
6906
  });
6907
6907
 
@@ -7126,7 +7126,7 @@ module.exports = {
7126
7126
  var $ = __webpack_require__(3);
7127
7127
  var log1p = __webpack_require__(236);
7128
7128
 
7129
- // eslint-disable-next-line es-x/no-math-acosh -- required for testing
7129
+ // eslint-disable-next-line es/no-math-acosh -- required for testing
7130
7130
  var $acosh = Math.acosh;
7131
7131
  var log = Math.log;
7132
7132
  var sqrt = Math.sqrt;
@@ -7158,7 +7158,7 @@ var log = Math.log;
7158
7158
 
7159
7159
  // `Math.log1p` method implementation
7160
7160
  // https://tc39.es/ecma262/#sec-math.log1p
7161
- // eslint-disable-next-line es-x/no-math-log1p -- safe
7161
+ // eslint-disable-next-line es/no-math-log1p -- safe
7162
7162
  module.exports = Math.log1p || function log1p(x) {
7163
7163
  var n = +x;
7164
7164
  return n > -1e-8 && n < 1e-8 ? n - n * n / 2 : log(1 + n);
@@ -7171,7 +7171,7 @@ module.exports = Math.log1p || function log1p(x) {
7171
7171
 
7172
7172
  var $ = __webpack_require__(3);
7173
7173
 
7174
- // eslint-disable-next-line es-x/no-math-asinh -- required for testing
7174
+ // eslint-disable-next-line es/no-math-asinh -- required for testing
7175
7175
  var $asinh = Math.asinh;
7176
7176
  var log = Math.log;
7177
7177
  var sqrt = Math.sqrt;
@@ -7195,7 +7195,7 @@ $({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {
7195
7195
 
7196
7196
  var $ = __webpack_require__(3);
7197
7197
 
7198
- // eslint-disable-next-line es-x/no-math-atanh -- required for testing
7198
+ // eslint-disable-next-line es/no-math-atanh -- required for testing
7199
7199
  var $atanh = Math.atanh;
7200
7200
  var log = Math.log;
7201
7201
 
@@ -7236,7 +7236,7 @@ $({ target: 'Math', stat: true }, {
7236
7236
 
7237
7237
  // `Math.sign` method implementation
7238
7238
  // https://tc39.es/ecma262/#sec-math.sign
7239
- // eslint-disable-next-line es-x/no-math-sign -- safe
7239
+ // eslint-disable-next-line es/no-math-sign -- safe
7240
7240
  module.exports = Math.sign || function sign(x) {
7241
7241
  var n = +x;
7242
7242
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -7271,7 +7271,7 @@ $({ target: 'Math', stat: true }, {
7271
7271
  var $ = __webpack_require__(3);
7272
7272
  var expm1 = __webpack_require__(243);
7273
7273
 
7274
- // eslint-disable-next-line es-x/no-math-cosh -- required for testing
7274
+ // eslint-disable-next-line es/no-math-cosh -- required for testing
7275
7275
  var $cosh = Math.cosh;
7276
7276
  var abs = Math.abs;
7277
7277
  var E = Math.E;
@@ -7290,7 +7290,7 @@ $({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, {
7290
7290
  /* 243 */
7291
7291
  /***/ (function(module) {
7292
7292
 
7293
- // eslint-disable-next-line es-x/no-math-expm1 -- safe
7293
+ // eslint-disable-next-line es/no-math-expm1 -- safe
7294
7294
  var $expm1 = Math.expm1;
7295
7295
  var exp = Math.exp;
7296
7296
 
@@ -7316,7 +7316,7 @@ var expm1 = __webpack_require__(243);
7316
7316
 
7317
7317
  // `Math.expm1` method
7318
7318
  // https://tc39.es/ecma262/#sec-math.expm1
7319
- // eslint-disable-next-line es-x/no-math-expm1 -- required for testing
7319
+ // eslint-disable-next-line es/no-math-expm1 -- required for testing
7320
7320
  $({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });
7321
7321
 
7322
7322
 
@@ -7351,7 +7351,7 @@ var roundTiesToEven = function (n) {
7351
7351
 
7352
7352
  // `Math.fround` method implementation
7353
7353
  // https://tc39.es/ecma262/#sec-math.fround
7354
- // eslint-disable-next-line es-x/no-math-fround -- safe
7354
+ // eslint-disable-next-line es/no-math-fround -- safe
7355
7355
  module.exports = Math.fround || function fround(x) {
7356
7356
  var n = +x;
7357
7357
  var $abs = abs(n);
@@ -7372,7 +7372,7 @@ module.exports = Math.fround || function fround(x) {
7372
7372
 
7373
7373
  var $ = __webpack_require__(3);
7374
7374
 
7375
- // eslint-disable-next-line es-x/no-math-hypot -- required for testing
7375
+ // eslint-disable-next-line es/no-math-hypot -- required for testing
7376
7376
  var $hypot = Math.hypot;
7377
7377
  var abs = Math.abs;
7378
7378
  var sqrt = Math.sqrt;
@@ -7414,7 +7414,7 @@ $({ target: 'Math', stat: true, arity: 2, forced: BUGGY }, {
7414
7414
  var $ = __webpack_require__(3);
7415
7415
  var fails = __webpack_require__(7);
7416
7416
 
7417
- // eslint-disable-next-line es-x/no-math-imul -- required for testing
7417
+ // eslint-disable-next-line es/no-math-imul -- required for testing
7418
7418
  var $imul = Math.imul;
7419
7419
 
7420
7420
  var FORCED = fails(function () {
@@ -7457,7 +7457,7 @@ $({ target: 'Math', stat: true }, {
7457
7457
  var log = Math.log;
7458
7458
  var LOG10E = Math.LOG10E;
7459
7459
 
7460
- // eslint-disable-next-line es-x/no-math-log10 -- safe
7460
+ // eslint-disable-next-line es/no-math-log10 -- safe
7461
7461
  module.exports = Math.log10 || function log10(x) {
7462
7462
  return log(x) * LOG10E;
7463
7463
  };
@@ -7520,7 +7520,7 @@ var exp = Math.exp;
7520
7520
  var E = Math.E;
7521
7521
 
7522
7522
  var FORCED = fails(function () {
7523
- // eslint-disable-next-line es-x/no-math-sinh -- required for testing
7523
+ // eslint-disable-next-line es/no-math-sinh -- required for testing
7524
7524
  return Math.sinh(-2e-17) != -2e-17;
7525
7525
  });
7526
7526
 
@@ -7768,7 +7768,7 @@ var globalIsFinite = global.isFinite;
7768
7768
 
7769
7769
  // `Number.isFinite` method
7770
7770
  // https://tc39.es/ecma262/#sec-number.isfinite
7771
- // eslint-disable-next-line es-x/no-number-isfinite -- safe
7771
+ // eslint-disable-next-line es/no-number-isfinite -- safe
7772
7772
  module.exports = Number.isFinite || function isFinite(it) {
7773
7773
  return typeof it == 'number' && globalIsFinite(it);
7774
7774
  };
@@ -7798,7 +7798,7 @@ var floor = Math.floor;
7798
7798
 
7799
7799
  // `IsIntegralNumber` abstract operation
7800
7800
  // https://tc39.es/ecma262/#sec-isintegralnumber
7801
- // eslint-disable-next-line es-x/no-number-isinteger -- safe
7801
+ // eslint-disable-next-line es/no-number-isinteger -- safe
7802
7802
  module.exports = Number.isInteger || function isInteger(it) {
7803
7803
  return !isObject(it) && isFinite(it) && floor(it) === it;
7804
7804
  };
@@ -7873,7 +7873,7 @@ var parseFloat = __webpack_require__(272);
7873
7873
 
7874
7874
  // `Number.parseFloat` method
7875
7875
  // https://tc39.es/ecma262/#sec-number.parseFloat
7876
- // eslint-disable-next-line es-x/no-number-parsefloat -- required for testing
7876
+ // eslint-disable-next-line es/no-number-parsefloat -- required for testing
7877
7877
  $({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
7878
7878
  parseFloat: parseFloat
7879
7879
  });
@@ -7916,7 +7916,7 @@ var parseInt = __webpack_require__(274);
7916
7916
 
7917
7917
  // `Number.parseInt` method
7918
7918
  // https://tc39.es/ecma262/#sec-number.parseint
7919
- // eslint-disable-next-line es-x/no-number-parseint -- required for testing
7919
+ // eslint-disable-next-line es/no-number-parseint -- required for testing
7920
7920
  $({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {
7921
7921
  parseInt: parseInt
7922
7922
  });
@@ -8235,7 +8235,7 @@ var assign = __webpack_require__(279);
8235
8235
 
8236
8236
  // `Object.assign` method
8237
8237
  // https://tc39.es/ecma262/#sec-object.assign
8238
- // eslint-disable-next-line es-x/no-object-assign -- required for testing
8238
+ // eslint-disable-next-line es/no-object-assign -- required for testing
8239
8239
  $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
8240
8240
  assign: assign
8241
8241
  });
@@ -8257,9 +8257,9 @@ var propertyIsEnumerableModule = __webpack_require__(10);
8257
8257
  var toObject = __webpack_require__(40);
8258
8258
  var IndexedObject = __webpack_require__(13);
8259
8259
 
8260
- // eslint-disable-next-line es-x/no-object-assign -- safe
8260
+ // eslint-disable-next-line es/no-object-assign -- safe
8261
8261
  var $assign = Object.assign;
8262
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
8262
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
8263
8263
  var defineProperty = Object.defineProperty;
8264
8264
  var concat = uncurryThis([].concat);
8265
8265
 
@@ -8279,7 +8279,7 @@ module.exports = !$assign || fails(function () {
8279
8279
  // should work with symbols and should have deterministic property order (V8 bug)
8280
8280
  var A = {};
8281
8281
  var B = {};
8282
- // eslint-disable-next-line es-x/no-symbol -- safe
8282
+ // eslint-disable-next-line es/no-symbol -- safe
8283
8283
  var symbol = Symbol();
8284
8284
  var alphabet = 'abcdefghijklmnopqrst';
8285
8285
  A[symbol] = 7;
@@ -8363,7 +8363,7 @@ module.exports = IS_PURE || !fails(function () {
8363
8363
  if (WEBKIT && WEBKIT < 535) return;
8364
8364
  var key = Math.random();
8365
8365
  // In FF throws only define methods
8366
- // eslint-disable-next-line no-undef, no-useless-call, es-x/no-legacy-object-prototype-accessor-methods -- required for testing
8366
+ // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing
8367
8367
  __defineSetter__.call(null, key, function () { /* empty */ });
8368
8368
  delete global[key];
8369
8369
  });
@@ -8379,7 +8379,7 @@ var defineProperties = (__webpack_require__(73).f);
8379
8379
 
8380
8380
  // `Object.defineProperties` method
8381
8381
  // https://tc39.es/ecma262/#sec-object.defineproperties
8382
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
8382
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
8383
8383
  $({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
8384
8384
  defineProperties: defineProperties
8385
8385
  });
@@ -8395,7 +8395,7 @@ var defineProperty = (__webpack_require__(45).f);
8395
8395
 
8396
8396
  // `Object.defineProperty` method
8397
8397
  // https://tc39.es/ecma262/#sec-object.defineproperty
8398
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
8398
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
8399
8399
  $({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
8400
8400
  defineProperty: defineProperty
8401
8401
  });
@@ -8493,7 +8493,7 @@ var fails = __webpack_require__(7);
8493
8493
  var isObject = __webpack_require__(20);
8494
8494
  var onFreeze = (__webpack_require__(230).onFreeze);
8495
8495
 
8496
- // eslint-disable-next-line es-x/no-object-freeze -- safe
8496
+ // eslint-disable-next-line es/no-object-freeze -- safe
8497
8497
  var $freeze = Object.freeze;
8498
8498
  var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });
8499
8499
 
@@ -8587,7 +8587,7 @@ var $ = __webpack_require__(3);
8587
8587
  var fails = __webpack_require__(7);
8588
8588
  var getOwnPropertyNames = (__webpack_require__(76).f);
8589
8589
 
8590
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- required for testing
8590
+ // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
8591
8591
  var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
8592
8592
 
8593
8593
  // `Object.getOwnPropertyNames` method
@@ -8653,7 +8653,7 @@ $({ target: 'Object', stat: true }, {
8653
8653
 
8654
8654
  // `SameValue` abstract operation
8655
8655
  // https://tc39.es/ecma262/#sec-samevalue
8656
- // eslint-disable-next-line es-x/no-object-is -- safe
8656
+ // eslint-disable-next-line es/no-object-is -- safe
8657
8657
  module.exports = Object.is || function is(x, y) {
8658
8658
  // eslint-disable-next-line no-self-compare -- NaN check
8659
8659
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
@@ -8669,7 +8669,7 @@ var $isExtensible = __webpack_require__(231);
8669
8669
 
8670
8670
  // `Object.isExtensible` method
8671
8671
  // https://tc39.es/ecma262/#sec-object.isextensible
8672
- // eslint-disable-next-line es-x/no-object-isextensible -- safe
8672
+ // eslint-disable-next-line es/no-object-isextensible -- safe
8673
8673
  $({ target: 'Object', stat: true, forced: Object.isExtensible !== $isExtensible }, {
8674
8674
  isExtensible: $isExtensible
8675
8675
  });
@@ -8685,7 +8685,7 @@ var isObject = __webpack_require__(20);
8685
8685
  var classof = __webpack_require__(15);
8686
8686
  var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(232);
8687
8687
 
8688
- // eslint-disable-next-line es-x/no-object-isfrozen -- safe
8688
+ // eslint-disable-next-line es/no-object-isfrozen -- safe
8689
8689
  var $isFrozen = Object.isFrozen;
8690
8690
  var FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); });
8691
8691
 
@@ -8710,7 +8710,7 @@ var isObject = __webpack_require__(20);
8710
8710
  var classof = __webpack_require__(15);
8711
8711
  var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(232);
8712
8712
 
8713
- // eslint-disable-next-line es-x/no-object-issealed -- safe
8713
+ // eslint-disable-next-line es/no-object-issealed -- safe
8714
8714
  var $isSealed = Object.isSealed;
8715
8715
  var FAILS_ON_PRIMITIVES = fails(function () { $isSealed(1); });
8716
8716
 
@@ -8815,7 +8815,7 @@ var onFreeze = (__webpack_require__(230).onFreeze);
8815
8815
  var FREEZING = __webpack_require__(233);
8816
8816
  var fails = __webpack_require__(7);
8817
8817
 
8818
- // eslint-disable-next-line es-x/no-object-preventextensions -- safe
8818
+ // eslint-disable-next-line es/no-object-preventextensions -- safe
8819
8819
  var $preventExtensions = Object.preventExtensions;
8820
8820
  var FAILS_ON_PRIMITIVES = fails(function () { $preventExtensions(1); });
8821
8821
 
@@ -8840,9 +8840,9 @@ var isObject = __webpack_require__(20);
8840
8840
  var toObject = __webpack_require__(40);
8841
8841
  var requireObjectCoercible = __webpack_require__(16);
8842
8842
 
8843
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
8843
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
8844
8844
  var getPrototypeOf = Object.getPrototypeOf;
8845
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
8845
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
8846
8846
  var setPrototypeOf = Object.setPrototypeOf;
8847
8847
  var ObjectPrototype = Object.prototype;
8848
8848
  var PROTO = '__proto__';
@@ -8888,7 +8888,7 @@ var onFreeze = (__webpack_require__(230).onFreeze);
8888
8888
  var FREEZING = __webpack_require__(233);
8889
8889
  var fails = __webpack_require__(7);
8890
8890
 
8891
- // eslint-disable-next-line es-x/no-object-seal -- safe
8891
+ // eslint-disable-next-line es/no-object-seal -- safe
8892
8892
  var $seal = Object.seal;
8893
8893
  var FAILS_ON_PRIMITIVES = fails(function () { $seal(1); });
8894
8894
 
@@ -9325,11 +9325,11 @@ var String = global.String;
9325
9325
  var counter = 0;
9326
9326
  var queue = {};
9327
9327
  var ONREADYSTATECHANGE = 'onreadystatechange';
9328
- var location, defer, channel, port;
9328
+ var $location, defer, channel, port;
9329
9329
 
9330
9330
  try {
9331
9331
  // Deno throws a ReferenceError on `location` access without `--location` flag
9332
- location = global.location;
9332
+ $location = global.location;
9333
9333
  } catch (error) { /* empty */ }
9334
9334
 
9335
9335
  var run = function (id) {
@@ -9352,7 +9352,7 @@ var listener = function (event) {
9352
9352
 
9353
9353
  var post = function (id) {
9354
9354
  // old engines have not location.origin
9355
- global.postMessage(String(id), location.protocol + '//' + location.host);
9355
+ global.postMessage(String(id), $location.protocol + '//' + $location.host);
9356
9356
  };
9357
9357
 
9358
9358
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
@@ -9393,7 +9393,7 @@ if (!set || !clear) {
9393
9393
  global.addEventListener &&
9394
9394
  isCallable(global.postMessage) &&
9395
9395
  !global.importScripts &&
9396
- location && location.protocol !== 'file:' &&
9396
+ $location && $location.protocol !== 'file:' &&
9397
9397
  !fails(post)
9398
9398
  ) {
9399
9399
  defer = post;
@@ -10073,7 +10073,7 @@ var fails = __webpack_require__(7);
10073
10073
 
10074
10074
  // MS Edge argumentsList argument is optional
10075
10075
  var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
10076
- // eslint-disable-next-line es-x/no-reflect -- required for testing
10076
+ // eslint-disable-next-line es/no-reflect -- required for testing
10077
10077
  Reflect.apply(function () { /* empty */ });
10078
10078
  });
10079
10079
 
@@ -10161,7 +10161,7 @@ var fails = __webpack_require__(7);
10161
10161
 
10162
10162
  // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
10163
10163
  var ERROR_INSTEAD_OF_FALSE = fails(function () {
10164
- // eslint-disable-next-line es-x/no-reflect -- required for testing
10164
+ // eslint-disable-next-line es/no-reflect -- required for testing
10165
10165
  Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
10166
10166
  });
10167
10167
 
@@ -10395,7 +10395,7 @@ function set(target, propertyKey, V /* , receiver */) {
10395
10395
  var MS_EDGE_BUG = fails(function () {
10396
10396
  var Constructor = function () { /* empty */ };
10397
10397
  var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });
10398
- // eslint-disable-next-line es-x/no-reflect -- required for testing
10398
+ // eslint-disable-next-line es/no-reflect -- required for testing
10399
10399
  return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
10400
10400
  });
10401
10401
 
@@ -10969,7 +10969,7 @@ var FORCED = DESCRIPTORS && fails(function () {
10969
10969
  var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
10970
10970
 
10971
10971
  var addGetter = function (key, chr) {
10972
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
10972
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
10973
10973
  Object.defineProperty(O, key, { get: function () {
10974
10974
  calls += chr;
10975
10975
  return true;
@@ -10988,7 +10988,7 @@ var FORCED = DESCRIPTORS && fails(function () {
10988
10988
 
10989
10989
  for (var key in pairs) addGetter(key, pairs[key]);
10990
10990
 
10991
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
10991
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
10992
10992
  var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);
10993
10993
 
10994
10994
  return result !== expected || calls !== expected;
@@ -11148,7 +11148,7 @@ var fails = __webpack_require__(7);
11148
11148
  var charAt = uncurryThis(''.charAt);
11149
11149
 
11150
11150
  var FORCED = fails(function () {
11151
- // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
11151
+ // eslint-disable-next-line es/no-array-string-prototype-at -- safe
11152
11152
  return '𠮷'.at(-2) !== '\uD842';
11153
11153
  });
11154
11154
 
@@ -11241,7 +11241,7 @@ var requireObjectCoercible = __webpack_require__(16);
11241
11241
  var correctIsRegExpLogic = __webpack_require__(375);
11242
11242
  var IS_PURE = __webpack_require__(36);
11243
11243
 
11244
- // eslint-disable-next-line es-x/no-string-prototype-endswith -- safe
11244
+ // eslint-disable-next-line es/no-string-prototype-endswith -- safe
11245
11245
  var nativeEndsWith = uncurryThis(''.endsWith);
11246
11246
  var slice = uncurryThis(''.slice);
11247
11247
  var min = Math.min;
@@ -11316,7 +11316,7 @@ var toAbsoluteIndex = __webpack_require__(61);
11316
11316
 
11317
11317
  var $RangeError = RangeError;
11318
11318
  var fromCharCode = String.fromCharCode;
11319
- // eslint-disable-next-line es-x/no-string-fromcodepoint -- required for testing
11319
+ // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
11320
11320
  var $fromCodePoint = String.fromCodePoint;
11321
11321
  var join = uncurryThis([].join);
11322
11322
 
@@ -11592,7 +11592,7 @@ module.exports = function (R, S) {
11592
11592
 
11593
11593
  "use strict";
11594
11594
 
11595
- /* eslint-disable es-x/no-string-prototype-matchall -- safe */
11595
+ /* eslint-disable es/no-string-prototype-matchall -- safe */
11596
11596
  var $ = __webpack_require__(3);
11597
11597
  var call = __webpack_require__(8);
11598
11598
  var uncurryThis = __webpack_require__(14);
@@ -12286,7 +12286,7 @@ var requireObjectCoercible = __webpack_require__(16);
12286
12286
  var correctIsRegExpLogic = __webpack_require__(375);
12287
12287
  var IS_PURE = __webpack_require__(36);
12288
12288
 
12289
- // eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
12289
+ // eslint-disable-next-line es/no-string-prototype-startswith -- safe
12290
12290
  var nativeStartsWith = uncurryThis(''.startsWith);
12291
12291
  var stringSlice = uncurryThis(''.slice);
12292
12292
  var min = Math.min;
@@ -12329,7 +12329,7 @@ var stringSlice = uncurryThis(''.slice);
12329
12329
  var max = Math.max;
12330
12330
  var min = Math.min;
12331
12331
 
12332
- // eslint-disable-next-line unicorn/prefer-string-slice, es-x/no-string-prototype-substr -- required for testing
12332
+ // eslint-disable-next-line unicorn/prefer-string-slice, es/no-string-prototype-substr -- required for testing
12333
12333
  var FORCED = !''.substr || 'ab'.substr(-1) !== 'b';
12334
12334
 
12335
12335
  // `String.prototype.substr` method
@@ -12401,7 +12401,7 @@ var trimEnd = __webpack_require__(400);
12401
12401
 
12402
12402
  // `String.prototype.trimEnd` method
12403
12403
  // https://tc39.es/ecma262/#sec-string.prototype.trimend
12404
- // eslint-disable-next-line es-x/no-string-prototype-trimstart-trimend -- safe
12404
+ // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12405
12405
  $({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimEnd !== trimEnd }, {
12406
12406
  trimEnd: trimEnd
12407
12407
  });
@@ -12416,7 +12416,7 @@ var trimEnd = __webpack_require__(400);
12416
12416
 
12417
12417
  // `String.prototype.trimRight` method
12418
12418
  // https://tc39.es/ecma262/#sec-string.prototype.trimend
12419
- // eslint-disable-next-line es-x/no-string-prototype-trimleft-trimright -- safe
12419
+ // eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
12420
12420
  $({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimRight !== trimEnd }, {
12421
12421
  trimRight: trimEnd
12422
12422
  });
@@ -12436,7 +12436,7 @@ var forcedStringTrimMethod = __webpack_require__(397);
12436
12436
  // https://tc39.es/ecma262/#String.prototype.trimright
12437
12437
  module.exports = forcedStringTrimMethod('trimEnd') ? function trimEnd() {
12438
12438
  return $trimEnd(this);
12439
- // eslint-disable-next-line es-x/no-string-prototype-trimstart-trimend -- safe
12439
+ // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12440
12440
  } : ''.trimEnd;
12441
12441
 
12442
12442
 
@@ -12451,7 +12451,7 @@ var trimStart = __webpack_require__(403);
12451
12451
 
12452
12452
  // `String.prototype.trimStart` method
12453
12453
  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
12454
- // eslint-disable-next-line es-x/no-string-prototype-trimstart-trimend -- safe
12454
+ // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12455
12455
  $({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimStart !== trimStart }, {
12456
12456
  trimStart: trimStart
12457
12457
  });
@@ -12466,7 +12466,7 @@ var trimStart = __webpack_require__(403);
12466
12466
 
12467
12467
  // `String.prototype.trimLeft` method
12468
12468
  // https://tc39.es/ecma262/#sec-string.prototype.trimleft
12469
- // eslint-disable-next-line es-x/no-string-prototype-trimleft-trimright -- safe
12469
+ // eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
12470
12470
  $({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimLeft !== trimStart }, {
12471
12471
  trimLeft: trimStart
12472
12472
  });
@@ -12486,7 +12486,7 @@ var forcedStringTrimMethod = __webpack_require__(397);
12486
12486
  // https://tc39.es/ecma262/#String.prototype.trimleft
12487
12487
  module.exports = forcedStringTrimMethod('trimStart') ? function trimStart() {
12488
12488
  return $trimStart(this);
12489
- // eslint-disable-next-line es-x/no-string-prototype-trimstart-trimend -- safe
12489
+ // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
12490
12490
  } : ''.trimStart;
12491
12491
 
12492
12492
 
@@ -13170,7 +13170,7 @@ var $TypeError = TypeError;
13170
13170
  module.exports = function (argument) {
13171
13171
  var prim = toPrimitive(argument, 'number');
13172
13172
  if (typeof prim == 'number') throw $TypeError("Can't convert number to bigint");
13173
- // eslint-disable-next-line es-x/no-bigint -- safe
13173
+ // eslint-disable-next-line es/no-bigint -- safe
13174
13174
  return BigInt(prim);
13175
13175
  };
13176
13176
 
@@ -13380,7 +13380,7 @@ var slice = uncurryThis(''.slice);
13380
13380
  // V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18
13381
13381
  var CONVERSION_BUG = fails(function () {
13382
13382
  var count = 0;
13383
- // eslint-disable-next-line es-x/no-typed-arrays -- safe
13383
+ // eslint-disable-next-line es/no-typed-arrays -- safe
13384
13384
  new Int8Array(2).fill({ valueOf: function () { return count++; } });
13385
13385
  return count !== 1;
13386
13386
  });
@@ -13837,7 +13837,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
13837
13837
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13838
13838
 
13839
13839
  var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
13840
- // eslint-disable-next-line es-x/no-typed-arrays -- required for testing
13840
+ // eslint-disable-next-line es/no-typed-arrays -- required for testing
13841
13841
  var array = new Uint8ClampedArray(2);
13842
13842
  call($set, array, { length: 1, 0: 3 }, 1);
13843
13843
  return array[1] !== 3;
@@ -13881,7 +13881,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
13881
13881
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13882
13882
 
13883
13883
  var FORCED = fails(function () {
13884
- // eslint-disable-next-line es-x/no-typed-arrays -- required for testing
13884
+ // eslint-disable-next-line es/no-typed-arrays -- required for testing
13885
13885
  new Int8Array(1).slice();
13886
13886
  });
13887
13887
 
@@ -14676,7 +14676,7 @@ var NativeDOMException = getBuiltIn(DOM_EXCEPTION) || (function () {
14676
14676
  try {
14677
14677
  // NodeJS < 15.0 does not expose `MessageChannel` to global
14678
14678
  var MessageChannel = getBuiltIn('MessageChannel') || tryNodeRequire('worker_threads').MessageChannel;
14679
- // eslint-disable-next-line es-x/no-weak-map, unicorn/require-post-message-target-origin -- safe
14679
+ // eslint-disable-next-line es/no-weak-map, unicorn/require-post-message-target-origin -- safe
14680
14680
  new MessageChannel().port1.postMessage(new WeakMap());
14681
14681
  } catch (error) {
14682
14682
  if (error.name == DATA_CLONE_ERR && error.code == 25) return error.constructor;
@@ -14879,7 +14879,7 @@ var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototy
14879
14879
  var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
14880
14880
  var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
14881
14881
 
14882
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
14882
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
14883
14883
  var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
14884
14884
 
14885
14885
  // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
@@ -16897,7 +16897,7 @@ var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
16897
16897
  var setInternalState = InternalStateModule.set;
16898
16898
  var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
16899
16899
  var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
16900
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
16900
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
16901
16901
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
16902
16902
 
16903
16903
  // Avoid NodeJS experimental warning
@@ -25208,9 +25208,15 @@ var data_this = undefined;
25208
25208
  * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
25209
25209
  * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
25210
25210
  * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
25211
- * @property {number} [legend.item.tile.width=10] Set width of item tile element
25212
- * @property {number} [legend.item.tile.height=10] Set height of item tile element
25211
+ * @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.
25212
+ * @property {number} [legend.item.tile.height=10] ㄹ
25213
+ * @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.
25214
+ * @property {string} [legend.item.tile.type="rectangle"] Set legend item shape type.<br>
25215
+ * - **Available Values:**
25216
+ * - circle
25217
+ * - rectangle
25213
25218
  * @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
25219
+ * @see [Demo: item.tile.type](https://naver.github.io/billboard.js/demo/#Legend.LegendItemTileType)
25214
25220
  * @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)
25215
25221
  * @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)
25216
25222
  * @see [Demo: usePoint](https://naver.github.io/billboard.js/demo/#Legend.usePoint)
@@ -25250,8 +25256,15 @@ var data_this = undefined;
25250
25256
  *
25251
25257
  * // set tile's size
25252
25258
  * tile: {
25253
- * width: 20,
25259
+ * // set tile type
25260
+ * type: "circle" // or "rectangle" (default)
25261
+ *
25262
+ * // width & height, are only applicable for 'rectangle' legend type
25263
+ * width: 15,
25254
25264
  * height: 15
25265
+ *
25266
+ * // radis is only applicable for 'circle' legend type
25267
+ * r: 10
25255
25268
  * }
25256
25269
  * },
25257
25270
  * usePoint: true
@@ -25273,6 +25286,8 @@ var data_this = undefined;
25273
25286
  legend_padding: 0,
25274
25287
  legend_item_tile_width: 10,
25275
25288
  legend_item_tile_height: 10,
25289
+ legend_item_tile_r: 5,
25290
+ legend_item_tile_type: "rectangle",
25276
25291
  legend_usePoint: !1
25277
25292
  });
25278
25293
  ;// CONCATENATED MODULE: ./src/config/Options/common/title.ts
@@ -29210,6 +29225,57 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
29210
29225
  }
29211
29226
  },
29212
29227
 
29228
+ /**
29229
+ * Get data gradient color url
29230
+ * @param {string} id Data id
29231
+ * @returns {string}
29232
+ * @private
29233
+ */
29234
+ getGradienColortUrl: function getGradienColortUrl(id) {
29235
+ return "url(#" + this.state.datetimeId + "-gradient" + this.getTargetSelectorSuffix(id) + ")";
29236
+ },
29237
+
29238
+ /**
29239
+ * Update linear gradient definition (for area & bar only)
29240
+ * @private
29241
+ */
29242
+ updateLinearGradient: function updateLinearGradient() {
29243
+ var _this5 = this,
29244
+ $$ = this,
29245
+ config = $$.config,
29246
+ targets = $$.data.targets,
29247
+ datetimeId = $$.state.datetimeId,
29248
+ defs = $$.$el.defs;
29249
+
29250
+ targets.forEach(function (d) {
29251
+ var _this6 = this;
29252
+
29253
+ _newArrowCheck(this, _this5);
29254
+
29255
+ var id = datetimeId + "-gradient" + $$.getTargetSelectorSuffix(d.id),
29256
+ supportedType = $$.isAreaType(d) && "area" || $$.isBarType(d) && "bar",
29257
+ isRotated = config.axis_rotated;
29258
+
29259
+ if (supportedType && defs.select("#" + id).empty()) {
29260
+ var color = $$.color(d),
29261
+ _config = config[supportedType + "_linearGradient"],
29262
+ _config$x = _config.x,
29263
+ x = _config$x === void 0 ? isRotated ? [1, 0] : [0, 0] : _config$x,
29264
+ _config$y = _config.y,
29265
+ y = _config$y === void 0 ? isRotated ? [0, 0] : [0, 1] : _config$y,
29266
+ _config$stops = _config.stops,
29267
+ stops = _config$stops === void 0 ? [[0, color, 1], [1, color, 0]] : _config$stops,
29268
+ linearGradient = defs.append("linearGradient").attr("id", "" + id).attr("x1", x[0]).attr("x2", x[1]).attr("y1", y[0]).attr("y2", y[1]);
29269
+ stops.forEach(function (v) {
29270
+ _newArrowCheck(this, _this6);
29271
+
29272
+ var stopColor = isFunction(v[1]) ? v[1].bind($$.api)(d.id) : v[1];
29273
+ linearGradient.append("stop").attr("offset", v[0]).attr("stop-color", stopColor || color).attr("stop-opacity", v[2]);
29274
+ }.bind(this));
29275
+ }
29276
+ }.bind(this));
29277
+ },
29278
+
29213
29279
  /**
29214
29280
  * Set the data over color.
29215
29281
  * When is out, will restate in its previous color value
@@ -29218,7 +29284,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
29218
29284
  * @private
29219
29285
  */
29220
29286
  setOverColor: function setOverColor(isOver, d) {
29221
- var _this5 = this,
29287
+ var _this7 = this,
29222
29288
  $$ = this,
29223
29289
  config = $$.config,
29224
29290
  main = $$.$el.main,
@@ -29229,13 +29295,13 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
29229
29295
  color = function (_ref) {
29230
29296
  var id = _ref.id;
29231
29297
 
29232
- _newArrowCheck(this, _this5);
29298
+ _newArrowCheck(this, _this7);
29233
29299
 
29234
29300
  return id in onover ? onover[id] : $$.color(id);
29235
29301
  }.bind(this);
29236
29302
  } else if (isString(color)) {
29237
29303
  color = function () {
29238
- _newArrowCheck(this, _this5);
29304
+ _newArrowCheck(this, _this7);
29239
29305
 
29240
29306
  return onover;
29241
29307
  }.bind(this);
@@ -29803,6 +29869,20 @@ function getFormat($$, typeValue, v) {
29803
29869
 
29804
29870
 
29805
29871
 
29872
+ /**
29873
+ * Get color string for given data id
29874
+ * @param {string} id Data id
29875
+ * @returns {string} Color string
29876
+ * @private
29877
+ */
29878
+
29879
+ function getLegendColor(id) {
29880
+ var $$ = this,
29881
+ data = $$.getDataById(id),
29882
+ color = $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);
29883
+ return color;
29884
+ }
29885
+
29806
29886
  /* harmony default export */ var internals_legend = ({
29807
29887
  /**
29808
29888
  * Initialize the legend.
@@ -30222,96 +30302,248 @@ function getFormat($$, typeValue, v) {
30222
30302
  state = $$.state,
30223
30303
  legend = $$.$el.legend,
30224
30304
  $T = $$.$T,
30225
- tileWidth = config.legend_item_tile_width + 5,
30226
- maxWidth = 0,
30227
- maxHeight = 0,
30305
+ legendType = config.legend_item_tile_type,
30306
+ isRectangle = legendType !== "circle",
30307
+ legendItemR = config.legend_item_tile_r,
30308
+ itemTileSize = {
30309
+ width: isRectangle ? config.legend_item_tile_width : legendItemR * 2,
30310
+ height: isRectangle ? config.legend_item_tile_height : legendItemR * 2
30311
+ },
30312
+ dimension = {
30313
+ padding: {
30314
+ top: 4,
30315
+ right: 10
30316
+ },
30317
+ max: {
30318
+ width: 0,
30319
+ height: 0
30320
+ },
30321
+ posMin: 10,
30322
+ step: 0,
30323
+ tileWidth: itemTileSize.width + 5,
30324
+ totalLength: 0
30325
+ },
30326
+ sizes = {
30327
+ offsets: {},
30328
+ widths: {},
30329
+ heights: {},
30330
+ margins: [0],
30331
+ steps: {}
30332
+ },
30228
30333
  xForLegend,
30229
30334
  yForLegend,
30230
- totalLength = 0,
30231
- offsets = {},
30232
- widths = {},
30233
- heights = {},
30234
- margins = [0],
30235
- steps = {},
30236
- step = 0,
30237
30335
  background,
30238
- isLegendRightOrInset = state.isLegendRight || state.isLegendInset,
30239
30336
  targetIdz = targetIds.filter(function (id) {
30240
30337
  _newArrowCheck(this, _this4);
30241
30338
 
30242
30339
  return !isDefined(config.data_names[id]) || config.data_names[id] !== null;
30243
30340
  }.bind(this)),
30244
30341
  withTransition = options.withTransition,
30245
- updatePositions = function (textElement, id, index) {
30342
+ updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes);
30343
+
30344
+ if (state.isLegendInset) {
30345
+ dimension.step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;
30346
+ $$.updateLegendStep(dimension.step);
30347
+ }
30348
+
30349
+ if (state.isLegendRight) {
30350
+ xForLegend = function (id) {
30351
+ _newArrowCheck(this, _this4);
30352
+
30353
+ return dimension.max.width * sizes.steps[id];
30354
+ }.bind(this);
30355
+
30356
+ yForLegend = function (id) {
30357
+ _newArrowCheck(this, _this4);
30358
+
30359
+ return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
30360
+ }.bind(this);
30361
+ } else if (state.isLegendInset) {
30362
+ xForLegend = function (id) {
30363
+ _newArrowCheck(this, _this4);
30364
+
30365
+ return dimension.max.width * sizes.steps[id] + 10;
30366
+ }.bind(this);
30367
+
30368
+ yForLegend = function (id) {
30369
+ _newArrowCheck(this, _this4);
30370
+
30371
+ return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
30372
+ }.bind(this);
30373
+ } else {
30374
+ xForLegend = function (id) {
30375
+ _newArrowCheck(this, _this4);
30376
+
30377
+ return sizes.margins[sizes.steps[id]] + sizes.offsets[id];
30378
+ }.bind(this);
30379
+
30380
+ yForLegend = function (id) {
30381
+ _newArrowCheck(this, _this4);
30382
+
30383
+ return dimension.max.height * sizes.steps[id];
30384
+ }.bind(this);
30385
+ }
30386
+
30387
+ var posFn = {
30388
+ xText: function xText(id, i) {
30389
+ _newArrowCheck(this, _this4);
30390
+
30391
+ return xForLegend(id, i) + 4 + itemTileSize.width;
30392
+ }.bind(this),
30393
+ xRect: function xRect(id, i) {
30394
+ _newArrowCheck(this, _this4);
30395
+
30396
+ return xForLegend(id, i);
30397
+ }.bind(this),
30398
+ x1Tile: function x1Tile(id, i) {
30399
+ _newArrowCheck(this, _this4);
30400
+
30401
+ return xForLegend(id, i) - 2;
30402
+ }.bind(this),
30403
+ x2Tile: function x2Tile(id, i) {
30404
+ _newArrowCheck(this, _this4);
30405
+
30406
+ return xForLegend(id, i) - 2 + itemTileSize.width;
30407
+ }.bind(this),
30408
+ yText: function yText(id, i) {
30409
+ _newArrowCheck(this, _this4);
30410
+
30411
+ return yForLegend(id, i) + 9;
30412
+ }.bind(this),
30413
+ yRect: function yRect(id, i) {
30414
+ _newArrowCheck(this, _this4);
30415
+
30416
+ return yForLegend(id, i) - 5;
30417
+ }.bind(this),
30418
+ yTile: function yTile(id, i) {
30419
+ _newArrowCheck(this, _this4);
30420
+
30421
+ return yForLegend(id, i) + 4;
30422
+ }.bind(this)
30423
+ };
30424
+ $$.generateLegendItem(targetIdz, itemTileSize, updatePositions, posFn); // Set background for inset legend
30425
+
30426
+ background = legend.select("." + $LEGEND.legendBackground + " rect");
30427
+
30428
+ if (state.isLegendInset && dimension.max.width > 0 && background.size() === 0) {
30429
+ background = legend.insert("g", "." + $LEGEND.legendItem).attr("class", $LEGEND.legendBackground).append("rect");
30430
+ }
30431
+
30432
+ var texts = legend.selectAll("text").data(targetIdz).text(function (id) {
30433
+ _newArrowCheck(this, _this4);
30434
+
30435
+ return isDefined(config.data_names[id]) ? config.data_names[id] : id;
30436
+ }.bind(this)) // MEMO: needed for update
30437
+ .each(function (id, i) {
30438
+ updatePositions(this, id, i);
30439
+ });
30440
+ $T(texts, withTransition).attr("x", posFn.xText).attr("y", posFn.yText);
30441
+ var rects = legend.selectAll("rect." + $LEGEND.legendItemEvent).data(targetIdz);
30442
+ $T(rects, withTransition).attr("width", function (id) {
30443
+ _newArrowCheck(this, _this4);
30444
+
30445
+ return sizes.widths[id];
30446
+ }.bind(this)).attr("height", function (id) {
30447
+ _newArrowCheck(this, _this4);
30448
+
30449
+ return sizes.heights[id];
30450
+ }.bind(this)).attr("x", posFn.xRect).attr("y", posFn.yRect); // update legend items position
30451
+
30452
+ $$.updateLegendItemPos(targetIdz, withTransition, posFn);
30453
+
30454
+ if (background) {
30455
+ $T(background, withTransition).attr("height", $$.getLegendHeight() - 12).attr("width", dimension.max.width * (dimension.step + 1) + 10);
30456
+ } // Update all to reflect change of legend
30457
+
30458
+
30459
+ $$.updateLegendItemWidth(dimension.max.width);
30460
+ $$.updateLegendItemHeight(dimension.max.height);
30461
+ $$.updateLegendStep(dimension.step);
30462
+ },
30463
+
30464
+ /**
30465
+ * Get position update function
30466
+ * @param {Array} targetIdz Data ids
30467
+ * @param {object} dimension Dimension object
30468
+ * @param {object} sizes Size object
30469
+ * @returns {Function} Update position function
30470
+ * @private
30471
+ */
30472
+ getUpdateLegendPositions: function getUpdateLegendPositions(targetIdz, dimension, sizes) {
30473
+ var $$ = this,
30474
+ config = $$.config,
30475
+ state = $$.state,
30476
+ isLegendRightOrInset = state.isLegendRight || state.isLegendInset;
30477
+ return function (textElement, id, index) {
30246
30478
  var _this5 = this,
30247
30479
  isLast = index === targetIdz.length - 1,
30248
30480
  box = $$.getLegendItemTextBox(id, textElement),
30249
- itemWidth = box.width + tileWidth + (isLast && !isLegendRightOrInset ? 0 : 10) + config.legend_padding,
30250
- itemHeight = box.height + 4,
30481
+ itemWidth = box.width + dimension.tileWidth + (isLast && !isLegendRightOrInset ? 0 : dimension.padding.right) + config.legend_padding,
30482
+ itemHeight = box.height + dimension.padding.top,
30251
30483
  itemLength = isLegendRightOrInset ? itemHeight : itemWidth,
30252
30484
  areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(),
30253
30485
  margin,
30254
30486
  updateValues = function (id2, withoutStep) {
30255
30487
  if (!withoutStep) {
30256
- margin = (areaLength - totalLength - itemLength) / 2;
30488
+ margin = (areaLength - dimension.totalLength - itemLength) / 2;
30257
30489
 
30258
- if (margin < 10) {
30490
+ if (margin < dimension.posMin) {
30259
30491
  margin = (areaLength - itemLength) / 2;
30260
- totalLength = 0;
30261
- step++;
30492
+ dimension.totalLength = 0;
30493
+ dimension.step++;
30262
30494
  }
30263
30495
  }
30264
30496
 
30265
- steps[id2] = step;
30266
- margins[step] = state.isLegendInset ? 10 : margin;
30267
- offsets[id2] = totalLength;
30268
- totalLength += itemLength;
30497
+ sizes.steps[id2] = dimension.step;
30498
+ sizes.margins[dimension.step] = state.isLegendInset ? 10 : margin;
30499
+ sizes.offsets[id2] = dimension.totalLength;
30500
+ dimension.totalLength += itemLength;
30269
30501
  };
30270
30502
 
30271
30503
  if (index === 0) {
30272
- totalLength = 0;
30273
- step = 0;
30274
- maxWidth = 0;
30275
- maxHeight = 0;
30504
+ dimension.totalLength = 0;
30505
+ dimension.step = 0;
30506
+ dimension.max.width = 0;
30507
+ dimension.max.height = 0;
30276
30508
  }
30277
30509
 
30278
30510
  if (config.legend_show && !$$.isLegendToShow(id)) {
30279
- widths[id] = 0;
30280
- heights[id] = 0;
30281
- steps[id] = 0;
30282
- offsets[id] = 0;
30511
+ sizes.widths[id] = 0;
30512
+ sizes.heights[id] = 0;
30513
+ sizes.steps[id] = 0;
30514
+ sizes.offsets[id] = 0;
30283
30515
  return;
30284
30516
  }
30285
30517
 
30286
- widths[id] = itemWidth;
30287
- heights[id] = itemHeight;
30518
+ sizes.widths[id] = itemWidth;
30519
+ sizes.heights[id] = itemHeight;
30288
30520
 
30289
- if (!maxWidth || itemWidth >= maxWidth) {
30290
- maxWidth = itemWidth;
30521
+ if (!dimension.max.width || itemWidth >= dimension.max.width) {
30522
+ dimension.max.width = itemWidth;
30291
30523
  }
30292
30524
 
30293
- if (!maxHeight || itemHeight >= maxHeight) {
30294
- maxHeight = itemHeight;
30525
+ if (!dimension.max.height || itemHeight >= dimension.max.height) {
30526
+ dimension.max.height = itemHeight;
30295
30527
  }
30296
30528
 
30297
- var maxLength = isLegendRightOrInset ? maxHeight : maxWidth;
30529
+ var maxLength = isLegendRightOrInset ? dimension.max.height : dimension.max.width;
30298
30530
 
30299
30531
  if (config.legend_equally) {
30300
- Object.keys(widths).forEach(function (id2) {
30532
+ Object.keys(sizes.widths).forEach(function (id2) {
30301
30533
  _newArrowCheck(this, _this5);
30302
30534
 
30303
- return widths[id2] = maxWidth;
30535
+ return sizes.widths[id2] = dimension.max.width;
30304
30536
  }.bind(this));
30305
- Object.keys(heights).forEach(function (id2) {
30537
+ Object.keys(sizes.heights).forEach(function (id2) {
30306
30538
  _newArrowCheck(this, _this5);
30307
30539
 
30308
- return heights[id2] = maxHeight;
30540
+ return sizes.heights[id2] = dimension.max.height;
30309
30541
  }.bind(this));
30310
30542
  margin = (areaLength - maxLength * targetIdz.length) / 2;
30311
30543
 
30312
- if (margin < 10) {
30313
- totalLength = 0;
30314
- step = 0;
30544
+ if (margin < dimension.posMin) {
30545
+ dimension.totalLength = 0;
30546
+ dimension.step = 0;
30315
30547
  targetIdz.forEach(function (id2) {
30316
30548
  _newArrowCheck(this, _this5);
30317
30549
 
@@ -30324,111 +30556,43 @@ function getFormat($$, typeValue, v) {
30324
30556
  updateValues(id);
30325
30557
  }
30326
30558
  };
30559
+ },
30327
30560
 
30328
- if (state.isLegendInset) {
30329
- step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;
30330
- $$.updateLegendStep(step);
30331
- }
30332
-
30333
- if (state.isLegendRight) {
30334
- xForLegend = function (id) {
30335
- _newArrowCheck(this, _this4);
30336
-
30337
- return maxWidth * steps[id];
30338
- }.bind(this);
30339
-
30340
- yForLegend = function (id) {
30341
- _newArrowCheck(this, _this4);
30342
-
30343
- return margins[steps[id]] + offsets[id];
30344
- }.bind(this);
30345
- } else if (state.isLegendInset) {
30346
- xForLegend = function (id) {
30347
- _newArrowCheck(this, _this4);
30348
-
30349
- return maxWidth * steps[id] + 10;
30350
- }.bind(this);
30351
-
30352
- yForLegend = function (id) {
30353
- _newArrowCheck(this, _this4);
30354
-
30355
- return margins[steps[id]] + offsets[id];
30356
- }.bind(this);
30357
- } else {
30358
- xForLegend = function (id) {
30359
- _newArrowCheck(this, _this4);
30360
-
30361
- return margins[steps[id]] + offsets[id];
30362
- }.bind(this);
30363
-
30364
- yForLegend = function (id) {
30365
- _newArrowCheck(this, _this4);
30366
-
30367
- return maxHeight * steps[id];
30368
- }.bind(this);
30369
- }
30370
-
30371
- var xForLegendText = function (id, i) {
30372
- _newArrowCheck(this, _this4);
30373
-
30374
- return xForLegend(id, i) + 4 + config.legend_item_tile_width;
30375
- }.bind(this),
30376
- xForLegendRect = function (id, i) {
30377
- _newArrowCheck(this, _this4);
30378
-
30379
- return xForLegend(id, i);
30380
- }.bind(this),
30381
- x1ForLegendTile = function (id, i) {
30382
- _newArrowCheck(this, _this4);
30383
-
30384
- return xForLegend(id, i) - 2;
30385
- }.bind(this),
30386
- x2ForLegendTile = function (id, i) {
30387
- _newArrowCheck(this, _this4);
30388
-
30389
- return xForLegend(id, i) - 2 + config.legend_item_tile_width;
30390
- }.bind(this),
30391
- yForLegendText = function (id, i) {
30392
- _newArrowCheck(this, _this4);
30393
-
30394
- return yForLegend(id, i) + 9;
30395
- }.bind(this),
30396
- yForLegendRect = function (id, i) {
30397
- _newArrowCheck(this, _this4);
30398
-
30399
- return yForLegend(id, i) - 5;
30400
- }.bind(this),
30401
- yForLegendTile = function (id, i) {
30402
- _newArrowCheck(this, _this4);
30403
-
30404
- return yForLegend(id, i) + 4;
30405
- }.bind(this),
30406
- pos = -200,
30561
+ /**
30562
+ * Generate legend item elements
30563
+ * @param {Array} targetIdz Data ids
30564
+ * @param {object} itemTileSize Item tile size {width, height}
30565
+ * @param {Function} updatePositions Update position function
30566
+ * @param {object} posFn Position functions
30567
+ * @private
30568
+ */
30569
+ generateLegendItem: function generateLegendItem(targetIdz, itemTileSize, updatePositions, posFn) {
30570
+ var _this6 = this,
30571
+ $$ = this,
30572
+ config = $$.config,
30573
+ state = $$.state,
30574
+ legend = $$.$el.legend,
30575
+ usePoint = config.legend_usePoint,
30576
+ legendItemR = config.legend_item_tile_r,
30577
+ legendType = config.legend_item_tile_type,
30578
+ isRectangle = legendType !== "circle",
30579
+ isLegendRightOrInset = state.isLegendRight || state.isLegendInset,
30407
30580
  l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
30408
30581
 
30409
30582
  $$.setLegendItem(l);
30410
30583
  l.append("text").text(function (id) {
30411
- _newArrowCheck(this, _this4);
30584
+ _newArrowCheck(this, _this6);
30412
30585
 
30413
30586
  return isDefined(config.data_names[id]) ? config.data_names[id] : id;
30414
30587
  }.bind(this)).each(function (id, i) {
30415
30588
  updatePositions(this, id, i);
30416
- }).style("pointer-events", $$.getStylePropValue("none")).attr("x", isLegendRightOrInset ? xForLegendText : pos).attr("y", isLegendRightOrInset ? pos : yForLegendText);
30417
- l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", $$.getStylePropValue("0")).attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
30418
-
30419
- var getColor = function (id) {
30420
- _newArrowCheck(this, _this4);
30421
-
30422
- var data = $$.getDataById(id),
30423
- color = $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);
30424
- return color;
30425
- }.bind(this),
30426
- usePoint = config.legend_usePoint;
30589
+ }).style("pointer-events", $$.getStylePropValue("none")).attr("x", isLegendRightOrInset ? posFn.xText : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yText);
30590
+ l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", $$.getStylePropValue("0")).attr("x", isLegendRightOrInset ? posFn.xRect : -200).attr("y", isLegendRightOrInset ? -200 : posFn.yRect);
30427
30591
 
30428
30592
  if (usePoint) {
30429
30593
  var _ids = [];
30430
30594
  l.append(function (d) {
30431
- _newArrowCheck(this, _this4);
30595
+ _newArrowCheck(this, _this6);
30432
30596
 
30433
30597
  var pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
30434
30598
  _ids.indexOf(d) === -1 && _ids.push(d);
@@ -30439,8 +30603,8 @@ function getFormat($$, typeValue, v) {
30439
30603
  }
30440
30604
 
30441
30605
  return browser_doc.createElementNS(namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
30442
- }.bind(this)).attr("class", $LEGEND.legendItemPoint).style("fill", getColor).style("pointer-events", $$.getStylePropValue("none")).attr("href", function (data, idx, selection) {
30443
- _newArrowCheck(this, _this4);
30606
+ }.bind(this)).attr("class", $LEGEND.legendItemPoint).style("fill", getLegendColor.bind($$)).style("pointer-events", $$.getStylePropValue("none")).attr("href", function (data, idx, selection) {
30607
+ _newArrowCheck(this, _this6);
30444
30608
 
30445
30609
  var node = selection[idx],
30446
30610
  nodeName = node.nodeName.toLowerCase(),
@@ -30448,49 +30612,47 @@ function getFormat($$, typeValue, v) {
30448
30612
  return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
30449
30613
  }.bind(this));
30450
30614
  } else {
30451
- l.append("line").attr("class", $LEGEND.legendItemTile).style("stroke", getColor).style("pointer-events", $$.getStylePropValue("none")).attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos).attr("y1", isLegendRightOrInset ? pos : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : pos).attr("y2", isLegendRightOrInset ? pos : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
30452
- } // Set background for inset legend
30453
-
30454
-
30455
- background = legend.select("." + $LEGEND.legendBackground + " rect");
30615
+ l.append(isRectangle ? "line" : legendType).attr("class", $LEGEND.legendItemTile).style("stroke", getLegendColor.bind($$)).style("pointer-events", $$.getStylePropValue("none")).call(function (selection) {
30616
+ _newArrowCheck(this, _this6);
30456
30617
 
30457
- if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
30458
- background = legend.insert("g", "." + $LEGEND.legendItem).attr("class", $LEGEND.legendBackground).append("rect");
30618
+ if (legendType === "circle") {
30619
+ selection.attr("r", legendItemR).style("fill", getLegendColor.bind($$)).attr("cx", isLegendRightOrInset ? posFn.x2Tile : -200).attr("cy", isLegendRightOrInset ? -200 : posFn.yTile);
30620
+ } else if (isRectangle) {
30621
+ selection.attr("stroke-width", itemTileSize.height).attr("x1", isLegendRightOrInset ? posFn.x1Tile : -200).attr("y1", isLegendRightOrInset ? -200 : posFn.yTile).attr("x2", isLegendRightOrInset ? posFn.x2Tile : -200).attr("y2", isLegendRightOrInset ? -200 : posFn.yTile);
30622
+ }
30623
+ }.bind(this));
30459
30624
  }
30625
+ },
30460
30626
 
30461
- var texts = legend.selectAll("text").data(targetIdz).text(function (id) {
30462
- _newArrowCheck(this, _this4);
30463
-
30464
- return isDefined(config.data_names[id]) ? config.data_names[id] : id;
30465
- }.bind(this)) // MEMO: needed for update
30466
- .each(function (id, i) {
30467
- updatePositions(this, id, i);
30468
- });
30469
- $T(texts, withTransition).attr("x", xForLegendText).attr("y", yForLegendText);
30470
- var rects = legend.selectAll("rect." + $LEGEND.legendItemEvent).data(targetIdz);
30471
- $T(rects, withTransition).attr("width", function (id) {
30472
- _newArrowCheck(this, _this4);
30473
-
30474
- return widths[id];
30475
- }.bind(this)).attr("height", function (id) {
30476
- _newArrowCheck(this, _this4);
30477
-
30478
- return heights[id];
30479
- }.bind(this)).attr("x", xForLegendRect).attr("y", yForLegendRect);
30627
+ /**
30628
+ * Update legend item position
30629
+ * @param {Array} targetIdz Data ids
30630
+ * @param {boolean} withTransition Whether or not to apply transition
30631
+ * @param {object} posFn Position functions
30632
+ * @private
30633
+ */
30634
+ updateLegendItemPos: function updateLegendItemPos(targetIdz, withTransition, posFn) {
30635
+ var _this8 = this,
30636
+ $$ = this,
30637
+ config = $$.config,
30638
+ legend = $$.$el.legend,
30639
+ $T = $$.$T,
30640
+ usePoint = config.legend_usePoint,
30641
+ legendType = config.legend_item_tile_type;
30480
30642
 
30481
30643
  if (usePoint) {
30482
30644
  var tiles = legend.selectAll("." + $LEGEND.legendItemPoint).data(targetIdz);
30483
30645
  $T(tiles, withTransition).each(function () {
30484
- var _this6 = this,
30646
+ var _this7 = this,
30485
30647
  nodeName = this.nodeName.toLowerCase(),
30486
30648
  pointR = config.point_r,
30487
30649
  x = "x",
30488
30650
  y = "y",
30489
30651
  xOffset = 2,
30490
30652
  yOffset = 2.5,
30491
- radius,
30492
- width,
30493
- height;
30653
+ radius = null,
30654
+ width = null,
30655
+ height = null;
30494
30656
 
30495
30657
  if (nodeName === "circle") {
30496
30658
  var size = pointR * .2;
@@ -30508,29 +30670,35 @@ function getFormat($$, typeValue, v) {
30508
30670
  }
30509
30671
 
30510
30672
  src_select(this).attr(x, function (d) {
30511
- _newArrowCheck(this, _this6);
30673
+ _newArrowCheck(this, _this7);
30512
30674
 
30513
- return x1ForLegendTile(d) + xOffset;
30675
+ return posFn.x1Tile(d) + xOffset;
30514
30676
  }.bind(this)).attr(y, function (d) {
30515
- _newArrowCheck(this, _this6);
30677
+ _newArrowCheck(this, _this7);
30516
30678
 
30517
- return yForLegendTile(d) - yOffset;
30679
+ return posFn.yTile(d) - yOffset;
30518
30680
  }.bind(this)).attr("r", radius).attr("width", width).attr("height", height);
30519
30681
  });
30520
30682
  } else {
30521
- var _tiles = legend.selectAll("line." + $LEGEND.legendItemTile).data(targetIdz);
30683
+ var _tiles = legend.selectAll("." + $LEGEND.legendItemTile).data(targetIdz);
30522
30684
 
30523
- $T(_tiles, withTransition).style("stroke", getColor).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile);
30524
- }
30685
+ $T(_tiles, withTransition).style("stroke", getLegendColor.bind($$)).call(function (selection) {
30686
+ var _this9 = this;
30525
30687
 
30526
- if (background) {
30527
- $T(background, withTransition).attr("height", $$.getLegendHeight() - 12).attr("width", maxWidth * (step + 1) + 10);
30528
- } // Update all to reflect change of legend
30688
+ _newArrowCheck(this, _this8);
30529
30689
 
30690
+ if (legendType === "circle") {
30691
+ selection.attr("cx", function (d) {
30692
+ _newArrowCheck(this, _this9);
30530
30693
 
30531
- $$.updateLegendItemWidth(maxWidth);
30532
- $$.updateLegendItemHeight(maxHeight);
30533
- $$.updateLegendStep(step);
30694
+ var x2 = posFn.x2Tile(d);
30695
+ return x2 - (x2 - posFn.x1Tile(d)) / 2;
30696
+ }.bind(this)).attr("cy", posFn.yTile);
30697
+ } else if (legendType !== "circle") {
30698
+ selection.attr("x1", posFn.x1Tile).attr("y1", posFn.yTile).attr("x2", posFn.x2Tile).attr("y2", posFn.yTile);
30699
+ }
30700
+ }.bind(this));
30701
+ }
30534
30702
  }
30535
30703
  });
30536
30704
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/redraw.ts
@@ -46347,42 +46515,16 @@ function point_y(p) {
46347
46515
  config = $$.config;
46348
46516
  mainLine.insert("g", "." + (config.area_front ? $CIRCLE.circles : $LINE.lines)).attr("class", $$.getClass("areas", !0));
46349
46517
  },
46350
- updateAreaGradient: function updateAreaGradient() {
46351
- var _this = this,
46352
- $$ = this,
46353
- config = $$.config,
46354
- datetimeId = $$.state.datetimeId,
46355
- defs = $$.$el.defs;
46356
-
46357
- $$.data.targets.forEach(function (d) {
46358
- var _this2 = this;
46359
-
46360
- _newArrowCheck(this, _this);
46361
-
46362
- var id = datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id);
46363
-
46364
- if ($$.isAreaType(d) && defs.select("#" + id).empty()) {
46365
- var color = $$.color(d),
46366
- _config$area_linearGr = config.area_linearGradient,
46367
- _config$area_linearGr2 = _config$area_linearGr.x,
46368
- x = _config$area_linearGr2 === void 0 ? [0, 0] : _config$area_linearGr2,
46369
- _config$area_linearGr3 = _config$area_linearGr.y,
46370
- y = _config$area_linearGr3 === void 0 ? [0, 1] : _config$area_linearGr3,
46371
- _config$area_linearGr4 = _config$area_linearGr.stops,
46372
- stops = _config$area_linearGr4 === void 0 ? [[0, color, 1], [1, color, 0]] : _config$area_linearGr4,
46373
- linearGradient = defs.append("linearGradient").attr("id", "" + id).attr("x1", x[0]).attr("x2", x[1]).attr("y1", y[0]).attr("y2", y[1]);
46374
- stops.forEach(function (v) {
46375
- _newArrowCheck(this, _this2);
46376
46518
 
46377
- var stopColor = isFunction(v[1]) ? v[1].bind($$.api)(d.id) : v[1];
46378
- linearGradient.append("stop").attr("offset", v[0]).attr("stop-color", stopColor || color).attr("stop-opacity", v[2]);
46379
- }.bind(this));
46380
- }
46381
- }.bind(this));
46382
- },
46519
+ /**
46520
+ * Update area color
46521
+ * @param {object} d Data object
46522
+ * @returns {string} Color string
46523
+ * @private
46524
+ */
46383
46525
  updateAreaColor: function updateAreaColor(d) {
46384
46526
  var $$ = this;
46385
- return $$.config.area_linearGradient ? "url(#" + $$.state.datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id) + ")" : $$.color(d);
46527
+ return $$.config.area_linearGradient ? $$.getGradienColortUrl(d.id) : $$.color(d);
46386
46528
  },
46387
46529
 
46388
46530
  /**
@@ -46402,7 +46544,7 @@ function point_y(p) {
46402
46544
  $el = $$.$el,
46403
46545
  $T = $$.$T,
46404
46546
  $root = isSub ? $el.subchart : $el;
46405
- config.area_linearGradient && $$.updateAreaGradient();
46547
+ config.area_linearGradient && $$.updateLinearGradient();
46406
46548
  var area = $root.main.selectAll("." + $AREA.areas).selectAll("." + $AREA.area).data($$.lineData.bind($$));
46407
46549
  $T(area.exit(), withTransition).style("opacity", "0").remove();
46408
46550
  $root.area = area.enter().append("path").attr("class", $$.getClass("area", !0)).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function () {
@@ -46420,7 +46562,7 @@ function point_y(p) {
46420
46562
  * @returns {Array}
46421
46563
  */
46422
46564
  redrawArea: function redrawArea(drawFn, withTransition, isSub) {
46423
- var _this3 = this;
46565
+ var _this = this;
46424
46566
 
46425
46567
  if (isSub === void 0) {
46426
46568
  isSub = !1;
@@ -46432,7 +46574,7 @@ function point_y(p) {
46432
46574
  orgAreaOpacity = $$.state.orgAreaOpacity;
46433
46575
 
46434
46576
  return [$$.$T(area, withTransition, getRandom()).attr("d", drawFn).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function (d) {
46435
- _newArrowCheck(this, _this3);
46577
+ _newArrowCheck(this, _this);
46436
46578
 
46437
46579
  return ($$.isAreaRangeType(d) ? orgAreaOpacity / 1.75 : orgAreaOpacity) + "";
46438
46580
  }.bind(this))];
@@ -46446,7 +46588,7 @@ function point_y(p) {
46446
46588
  * @private
46447
46589
  */
46448
46590
  generateDrawArea: function generateDrawArea(areaIndices, isSub) {
46449
- var _this4 = this,
46591
+ var _this2 = this,
46450
46592
  $$ = this,
46451
46593
  config = $$.config,
46452
46594
  lineConnectNull = config.line_connectNull,
@@ -46454,25 +46596,25 @@ function point_y(p) {
46454
46596
  getPoints = $$.generateGetAreaPoints(areaIndices, isSub),
46455
46597
  yScale = $$.getYScaleById.bind($$),
46456
46598
  xValue = function (d) {
46457
- _newArrowCheck(this, _this4);
46599
+ _newArrowCheck(this, _this2);
46458
46600
 
46459
46601
  return (isSub ? $$.subxx : $$.xx).call($$, d);
46460
46602
  }.bind(this),
46461
46603
  value0 = function (d, i) {
46462
- _newArrowCheck(this, _this4);
46604
+ _newArrowCheck(this, _this2);
46463
46605
 
46464
46606
  return $$.isGrouped(d.id) ? getPoints(d, i)[0][1] : yScale(d.id, isSub)($$.isAreaRangeType(d) ? $$.getRangedData(d, "high") : $$.getShapeYMin(d.id));
46465
46607
  }.bind(this),
46466
46608
  value1 = function (d, i) {
46467
- _newArrowCheck(this, _this4);
46609
+ _newArrowCheck(this, _this2);
46468
46610
 
46469
46611
  return $$.isGrouped(d.id) ? getPoints(d, i)[1][1] : yScale(d.id, isSub)($$.isAreaRangeType(d) ? $$.getRangedData(d, "low") : d.value);
46470
46612
  }.bind(this);
46471
46613
 
46472
46614
  return function (d) {
46473
- var _this5 = this;
46615
+ var _this3 = this;
46474
46616
 
46475
- _newArrowCheck(this, _this4);
46617
+ _newArrowCheck(this, _this2);
46476
46618
 
46477
46619
  var values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,
46478
46620
  x0 = 0,
@@ -46485,7 +46627,7 @@ function point_y(p) {
46485
46627
 
46486
46628
  if (!lineConnectNull) {
46487
46629
  area = area.defined(function (d) {
46488
- _newArrowCheck(this, _this5);
46630
+ _newArrowCheck(this, _this3);
46489
46631
 
46490
46632
  return $$.getBaseValue(d) !== null;
46491
46633
  }.bind(this));
@@ -46608,14 +46750,28 @@ function point_y(p) {
46608
46750
  }
46609
46751
 
46610
46752
  var $$ = this,
46753
+ config = $$.config,
46611
46754
  $el = $$.$el,
46612
46755
  $T = $$.$T,
46613
46756
  $root = isSub ? $el.subchart : $el,
46614
46757
  classBar = $$.getClass("bar", !0),
46615
- initialOpacity = $$.initialOpacity.bind($$),
46616
- bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
46758
+ initialOpacity = $$.initialOpacity.bind($$);
46759
+ config.bar_linearGradient && $$.updateLinearGradient();
46760
+ var bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
46617
46761
  $T(bar.exit(), withTransition).style("opacity", "0").remove();
46618
- $root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.getStylePropValue($$.color)).merge(bar).style("opacity", initialOpacity);
46762
+ $root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.updateBarColor.bind($$)).merge(bar).style("opacity", initialOpacity);
46763
+ },
46764
+
46765
+ /**
46766
+ * Update bar color
46767
+ * @param {object} d Data object
46768
+ * @returns {string} Color string
46769
+ * @private
46770
+ */
46771
+ updateBarColor: function updateBarColor(d) {
46772
+ var $$ = this,
46773
+ fn = $$.getStylePropValue($$.color);
46774
+ return $$.config.bar_linearGradient ? $$.getGradienColortUrl(d.id) : fn ? fn(d) : null;
46619
46775
  },
46620
46776
 
46621
46777
  /**
@@ -46624,6 +46780,7 @@ function point_y(p) {
46624
46780
  * @param {boolean} withTransition With or without transition
46625
46781
  * @param {boolean} isSub Subchart draw
46626
46782
  * @returns {Array}
46783
+ * @private
46627
46784
  */
46628
46785
  redrawBar: function redrawBar(drawFn, withTransition, isSub) {
46629
46786
  var _this3 = this;
@@ -46640,7 +46797,7 @@ function point_y(p) {
46640
46797
  _newArrowCheck(this, _this3);
46641
46798
 
46642
46799
  return (isNumber(d.value) || $$.isBarRangeType(d)) && drawFn(d);
46643
- }.bind(this)).style("fill", $$.getStylePropValue($$.color)).style("opacity", null)];
46800
+ }.bind(this)).style("fill", $$.updateBarColor.bind($$)).style("opacity", null)];
46644
46801
  },
46645
46802
 
46646
46803
  /**
@@ -48929,6 +49086,11 @@ var cacheKey = KEY.radarPoints;
48929
49086
  * @property {object} bar Bar object
48930
49087
  * @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
48931
49088
  * @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
49089
+ * @property {boolean|object} [bar.linearGradient=false] Set the linear gradient on bar.<br><br>
49090
+ * Or customize by giving below object value:
49091
+ * - x {Array}: `x1`, `x2` value
49092
+ * - y {Array}: `y1`, `y2` value
49093
+ * - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
48932
49094
  * @property {boolean} [bar.overlap=false] Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)
48933
49095
  * @property {number} [bar.padding=0] The padding pixel value between each bar.
48934
49096
  * @property {number} [bar.radius] Set the radius of bar edge in pixel.
@@ -48957,6 +49119,30 @@ var cacheKey = KEY.radarPoints;
48957
49119
  * removeNull: true
48958
49120
  * },
48959
49121
  *
49122
+ * // will generate follwing linearGradient:
49123
+ * // <linearGradient x1="0" x2="0" y1="0" y2="1">
49124
+ * // <stop offset="0" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
49125
+ * // <stop offset="1" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
49126
+ * // </linearGradient>
49127
+ * linearGradient: true,
49128
+ *
49129
+ * // Or customized gradient
49130
+ * linearGradient: {
49131
+ * x: [0, 0], // x1, x2 attributes
49132
+ * y: [0, 0], // y1, y2 attributes
49133
+ * stops: [
49134
+ * // offset, stop-color, stop-opacity
49135
+ * [0, "#7cb5ec", 1],
49136
+ *
49137
+ * // setting 'null' for stop-color, will set its original data color
49138
+ * [0.5, null, 0],
49139
+ *
49140
+ * // setting 'function' for stop-color, will pass data id as argument.
49141
+ * // It should return color string or null value
49142
+ * [1, function(id) { return id === "data1" ? "red" : "blue"; }, 0],
49143
+ * ]
49144
+ * },
49145
+ *
48960
49146
  * // remove nullish da
48961
49147
  * overlap: true,
48962
49148
  *
@@ -48999,6 +49185,7 @@ var cacheKey = KEY.radarPoints;
48999
49185
  * }
49000
49186
  */
49001
49187
  bar_label_threshold: 0,
49188
+ bar_linearGradient: !1,
49002
49189
  bar_indices_removeNull: !1,
49003
49190
  bar_overlap: !1,
49004
49191
  bar_padding: 0,
@@ -52624,7 +52811,7 @@ var _defaults = {},
52624
52811
  * bb.version; // "1.0.0"
52625
52812
  * @memberof bb
52626
52813
  */
52627
- version: "3.6.0-next.2",
52814
+ version: "3.6.0",
52628
52815
 
52629
52816
  /**
52630
52817
  * Generate chart
@@ -52759,7 +52946,7 @@ var _defaults = {},
52759
52946
  };
52760
52947
  /**
52761
52948
  * @namespace bb
52762
- * @version 3.6.0-next.2
52949
+ * @version 3.6.0
52763
52950
  */
52764
52951
  ;// CONCATENATED MODULE: ./src/index.ts
52765
52952