cx 24.0.1 → 24.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/charts.js CHANGED
@@ -35,46 +35,21 @@ import {
35
35
  getCursorPos,
36
36
  } from "cx/widgets";
37
37
 
38
- function ownKeys(object, enumerableOnly) {
39
- var keys = Object.keys(object);
40
- if (Object.getOwnPropertySymbols) {
41
- var symbols = Object.getOwnPropertySymbols(object);
42
- enumerableOnly &&
43
- (symbols = symbols.filter(function (sym) {
44
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
45
- })),
46
- keys.push.apply(keys, symbols);
47
- }
48
- return keys;
49
- }
50
- function _objectSpread2(target) {
51
- for (var i = 1; i < arguments.length; i++) {
52
- var source = null != arguments[i] ? arguments[i] : {};
53
- i % 2
54
- ? ownKeys(Object(source), !0).forEach(function (key) {
55
- _defineProperty(target, key, source[key]);
56
- })
57
- : Object.getOwnPropertyDescriptors
58
- ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))
59
- : ownKeys(Object(source)).forEach(function (key) {
60
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
61
- });
62
- }
63
- return target;
64
- }
65
- function _defineProperty(obj, key, value) {
66
- key = _toPropertyKey(key);
67
- if (key in obj) {
68
- Object.defineProperty(obj, key, {
69
- value: value,
70
- enumerable: true,
71
- configurable: true,
72
- writable: true,
73
- });
74
- } else {
75
- obj[key] = value;
76
- }
77
- return obj;
38
+ function _extends() {
39
+ _extends = Object.assign
40
+ ? Object.assign.bind()
41
+ : function (target) {
42
+ for (var i = 1; i < arguments.length; i++) {
43
+ var source = arguments[i];
44
+ for (var key in source) {
45
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
46
+ target[key] = source[key];
47
+ }
48
+ }
49
+ }
50
+ return target;
51
+ };
52
+ return _extends.apply(this, arguments);
78
53
  }
79
54
  function _inheritsLoose(subClass, superClass) {
80
55
  subClass.prototype = Object.create(superClass.prototype);
@@ -87,23 +62,9 @@ function _setPrototypeOf(o, p) {
87
62
  : function _setPrototypeOf(o, p) {
88
63
  o.__proto__ = p;
89
64
  return o;
90
- };
65
+ };
91
66
  return _setPrototypeOf(o, p);
92
67
  }
93
- function _toPrimitive(input, hint) {
94
- if (typeof input !== "object" || input === null) return input;
95
- var prim = input[Symbol.toPrimitive];
96
- if (prim !== undefined) {
97
- var res = prim.call(input, hint || "default");
98
- if (typeof res !== "object") return res;
99
- throw new TypeError("@@toPrimitive must return a primitive value.");
100
- }
101
- return (hint === "string" ? String : Number)(input);
102
- }
103
- function _toPropertyKey(arg) {
104
- var key = _toPrimitive(arg, "string");
105
- return typeof key === "symbol" ? key : String(key);
106
- }
107
68
 
108
69
  var Rect = /*#__PURE__*/ (function () {
109
70
  function Rect(config) {
@@ -212,7 +173,7 @@ var BoundedObject = /*#__PURE__*/ (function (_PureContainer) {
212
173
  margin: undefined,
213
174
  padding: undefined,
214
175
  },
215
- ].concat(Array.prototype.slice.call(arguments))
176
+ ].concat(Array.prototype.slice.call(arguments)),
216
177
  );
217
178
  };
218
179
  _proto.prepareData = function prepareData(context, instance) {
@@ -298,7 +259,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
298
259
  tickStyle: undefined,
299
260
  tickClass: undefined,
300
261
  },
301
- ].concat(Array.prototype.slice.call(arguments))
262
+ ].concat(Array.prototype.slice.call(arguments)),
302
263
  );
303
264
  };
304
265
  _proto.prepareData = function prepareData(context, instance) {
@@ -347,7 +308,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
347
308
  x2: x2,
348
309
  y2: y2,
349
310
  },
350
- "line"
311
+ "line",
351
312
  );
352
313
  }
353
314
  var t = [];
@@ -391,8 +352,8 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
391
352
  transform: transform,
392
353
  children: _this.renderLabels(lines, x, _this.labelDy, _this.labelDx, offsetClass),
393
354
  },
394
- "label-" + si + "-" + i
395
- )
355
+ "label-" + si + "-" + i,
356
+ ),
396
357
  );
397
358
  });
398
359
  });
@@ -405,7 +366,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
405
366
  style: data.tickStyle,
406
367
  d: t.join(" "),
407
368
  },
408
- "ticks"
369
+ "ticks",
409
370
  );
410
371
  }
411
372
  return res;
@@ -449,8 +410,8 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
449
410
  dy: dy,
450
411
  children: "_",
451
412
  },
452
- -2
453
- )
413
+ -2,
414
+ ),
454
415
  );
455
416
  }
456
417
  lines.forEach(function (p, i) {
@@ -465,8 +426,8 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
465
426
  dx: dx,
466
427
  children: p.text,
467
428
  },
468
- i
469
- )
429
+ i,
430
+ ),
470
431
  );
471
432
  });
472
433
  return result;
@@ -526,7 +487,7 @@ var Chart = /*#__PURE__*/ (function (_BoundedObject) {
526
487
  }
527
488
  };
528
489
  _proto.explore = function explore(context, instance) {
529
- instance.calculators = _objectSpread2({}, context.axes);
490
+ instance.calculators = _extends({}, context.axes);
530
491
  context.push("axes", instance.calculators);
531
492
  instance.axes = {};
532
493
 
@@ -586,7 +547,7 @@ var PieChart = /*#__PURE__*/ (function (_BoundedObject) {
586
547
  startAngle: 0,
587
548
  clockwise: undefined,
588
549
  },
589
- ])
550
+ ]),
590
551
  );
591
552
  };
592
553
  _proto.explore = function explore(context, instance) {
@@ -707,7 +668,7 @@ function createSvgArc(x, y, r0, r, startAngle, endAngle) {
707
668
  y - Math.sin(endAngle) * r,
708
669
  "L",
709
670
  startX,
710
- startY
671
+ startY,
711
672
  );
712
673
  return result.join(" ");
713
674
  }
@@ -748,7 +709,7 @@ var PieSlice = /*#__PURE__*/ (function (_Container) {
748
709
  legend: undefined,
749
710
  hoverId: undefined,
750
711
  },
751
- ])
712
+ ]),
752
713
  );
753
714
  };
754
715
  _proto3.prepareData = function prepareData(context, instance) {
@@ -867,7 +828,7 @@ var PieSlice = /*#__PURE__*/ (function (_Container) {
867
828
  data.r0 * segment.radiusMultiplier,
868
829
  data.r * segment.radiusMultiplier,
869
830
  segment.startAngle,
870
- segment.endAngle
831
+ segment.endAngle,
871
832
  );
872
833
  return /*#__PURE__*/ jsxs(
873
834
  "g",
@@ -893,7 +854,7 @@ var PieSlice = /*#__PURE__*/ (function (_Container) {
893
854
  _this3.renderChildren(context, instance),
894
855
  ],
895
856
  },
896
- key
857
+ key,
897
858
  );
898
859
  });
899
860
  };
@@ -955,7 +916,7 @@ var PieLabel = /*#__PURE__*/ (function (_BoundedObject) {
955
916
  },
956
917
  lineColorIndex: undefined,
957
918
  },
958
- ])
919
+ ]),
959
920
  );
960
921
  };
961
922
  _proto.calculateBounds = function calculateBounds(context, instance) {
@@ -994,7 +955,7 @@ var PieLabel = /*#__PURE__*/ (function (_BoundedObject) {
994
955
  className: this.CSS.element(
995
956
  this.baseClass,
996
957
  "line",
997
- data.lineColorIndex != null && "color-" + data.lineColorIndex
958
+ data.lineColorIndex != null && "color-" + data.lineColorIndex,
998
959
  ),
999
960
  x1: actualBounds.l < originalBounds.l ? actualBounds.r : actualBounds.l,
1000
961
  y1: (actualBounds.t + actualBounds.b) / 2,
@@ -1009,7 +970,7 @@ var PieLabel = /*#__PURE__*/ (function (_BoundedObject) {
1009
970
  }),
1010
971
  ],
1011
972
  },
1012
- key
973
+ key,
1013
974
  );
1014
975
  };
1015
976
  return PieLabel;
@@ -1116,7 +1077,7 @@ var ColumnBarBase = /*#__PURE__*/ (function (_PureContainer) {
1116
1077
  hoverId: undefined,
1117
1078
  borderRadius: undefined,
1118
1079
  },
1119
- ])
1080
+ ]),
1120
1081
  );
1121
1082
  };
1122
1083
  _proto.prepareData = function prepareData(context, instance) {
@@ -1223,7 +1184,7 @@ var ColumnBarBase = /*#__PURE__*/ (function (_PureContainer) {
1223
1184
  _this2.renderChildren(context, instance),
1224
1185
  ],
1225
1186
  },
1226
- key
1187
+ key,
1227
1188
  );
1228
1189
  });
1229
1190
  };
@@ -1271,7 +1232,7 @@ var Column = /*#__PURE__*/ (function (_ColumnBarBase) {
1271
1232
  size: undefined,
1272
1233
  autoSize: undefined,
1273
1234
  },
1274
- ])
1235
+ ]),
1275
1236
  );
1276
1237
  };
1277
1238
  _proto.checkValid = function checkValid(data) {
@@ -1355,7 +1316,7 @@ var Bar = /*#__PURE__*/ (function (_ColumnBarBase) {
1355
1316
  size: undefined,
1356
1317
  autoSize: undefined,
1357
1318
  },
1358
- ])
1319
+ ]),
1359
1320
  );
1360
1321
  };
1361
1322
  _proto.checkValid = function checkValid(data) {
@@ -1433,15 +1394,11 @@ function getAvailableShapes() {
1433
1394
  function circle(cx, cy, size, props, options) {
1434
1395
  return /*#__PURE__*/ jsx(
1435
1396
  "circle",
1436
- _objectSpread2(
1437
- _objectSpread2({}, props),
1438
- {},
1439
- {
1440
- cx: cx,
1441
- cy: cy,
1442
- r: size / 2,
1443
- }
1444
- )
1397
+ _extends({}, props, {
1398
+ cx: cx,
1399
+ cy: cy,
1400
+ r: size / 2,
1401
+ }),
1445
1402
  );
1446
1403
  }
1447
1404
  registerShape("circle", circle);
@@ -1449,16 +1406,12 @@ function square(cx, cy, size, props, options) {
1449
1406
  size *= 0.9;
1450
1407
  return /*#__PURE__*/ jsx(
1451
1408
  "rect",
1452
- _objectSpread2(
1453
- _objectSpread2({}, props),
1454
- {},
1455
- {
1456
- x: cx - size / 2,
1457
- y: cy - size / 2,
1458
- width: size,
1459
- height: size,
1460
- }
1461
- )
1409
+ _extends({}, props, {
1410
+ x: cx - size / 2,
1411
+ y: cy - size / 2,
1412
+ width: size,
1413
+ height: size,
1414
+ }),
1462
1415
  );
1463
1416
  }
1464
1417
  registerShape("square", square);
@@ -1467,16 +1420,12 @@ function bar(cx, cy, size, props, options) {
1467
1420
  size *= 0.9;
1468
1421
  return /*#__PURE__*/ jsx(
1469
1422
  "rect",
1470
- _objectSpread2(
1471
- _objectSpread2({}, props),
1472
- {},
1473
- {
1474
- x: cx - size / 2,
1475
- y: cy - size / 4,
1476
- width: size,
1477
- height: size / 2,
1478
- }
1479
- )
1423
+ _extends({}, props, {
1424
+ x: cx - size / 2,
1425
+ y: cy - size / 4,
1426
+ width: size,
1427
+ height: size / 2,
1428
+ }),
1480
1429
  );
1481
1430
  }
1482
1431
  registerShape("bar", bar);
@@ -1484,16 +1433,12 @@ function column(cx, cy, size, props, options) {
1484
1433
  size *= 0.9;
1485
1434
  return /*#__PURE__*/ jsx(
1486
1435
  "rect",
1487
- _objectSpread2(
1488
- _objectSpread2({}, props),
1489
- {},
1490
- {
1491
- x: cx - size / 4,
1492
- y: cy - size / 2,
1493
- width: size / 2,
1494
- height: size,
1495
- }
1496
- )
1436
+ _extends({}, props, {
1437
+ x: cx - size / 4,
1438
+ y: cy - size / 2,
1439
+ width: size / 2,
1440
+ height: size,
1441
+ }),
1497
1442
  );
1498
1443
  }
1499
1444
  registerShape("column", column);
@@ -1501,16 +1446,12 @@ function line(cx, cy, size, props, options) {
1501
1446
  size *= 0.9;
1502
1447
  return /*#__PURE__*/ jsx(
1503
1448
  "line",
1504
- _objectSpread2(
1505
- _objectSpread2({}, props),
1506
- {},
1507
- {
1508
- x1: cx - size / 2,
1509
- y1: cy,
1510
- x2: cx + size / 2,
1511
- y2: cy,
1512
- }
1513
- )
1449
+ _extends({}, props, {
1450
+ x1: cx - size / 2,
1451
+ y1: cy,
1452
+ x2: cx + size / 2,
1453
+ y2: cy,
1454
+ }),
1514
1455
  );
1515
1456
  }
1516
1457
  registerShape("line", line);
@@ -1519,16 +1460,12 @@ function vline(cx, cy, size, props, options) {
1519
1460
  size *= 0.9;
1520
1461
  return /*#__PURE__*/ jsx(
1521
1462
  "line",
1522
- _objectSpread2(
1523
- _objectSpread2({}, props),
1524
- {},
1525
- {
1526
- x1: cx,
1527
- y1: cy - size / 2,
1528
- x2: cx,
1529
- y2: cy + size / 2,
1530
- }
1531
- )
1463
+ _extends({}, props, {
1464
+ x1: cx,
1465
+ y1: cy - size / 2,
1466
+ x2: cx,
1467
+ y2: cy + size / 2,
1468
+ }),
1532
1469
  );
1533
1470
  }
1534
1471
  registerShape("vline", vline);
@@ -1543,13 +1480,9 @@ function triangle(cx, cy, size, props, options) {
1543
1480
  d += "Z";
1544
1481
  return /*#__PURE__*/ jsx(
1545
1482
  "path",
1546
- _objectSpread2(
1547
- _objectSpread2({}, props),
1548
- {},
1549
- {
1550
- d: d,
1551
- }
1552
- )
1483
+ _extends({}, props, {
1484
+ d: d,
1485
+ }),
1553
1486
  );
1554
1487
  }
1555
1488
  registerShape("triangle", triangle);
@@ -1575,7 +1508,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1575
1508
  {
1576
1509
  shape: undefined,
1577
1510
  },
1578
- ])
1511
+ ]),
1579
1512
  );
1580
1513
  };
1581
1514
  _proto.isValidHtmlAttribute = function isValidHtmlAttribute(attrName) {
@@ -1635,12 +1568,12 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1635
1568
  onMouseLeave: onMouseLeave,
1636
1569
  children: [_this.renderShape(e, instance.data.shape), e.name],
1637
1570
  },
1638
- i
1571
+ i,
1639
1572
  );
1640
1573
  });
1641
1574
  }),
1642
1575
  },
1643
- "wrap"
1576
+ "wrap",
1644
1577
  );
1645
1578
  }
1646
1579
  return [list, _HtmlElement.prototype.renderChildren.call(this, context, instance)];
@@ -1653,7 +1586,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1653
1586
  ((_this$CSS$element = {}),
1654
1587
  (_this$CSS$element["color-" + entry.colorIndex] =
1655
1588
  entry.colorIndex != null && (isUndefined(entry.active) || entry.active)),
1656
- _this$CSS$element)
1589
+ _this$CSS$element),
1657
1590
  );
1658
1591
  var shape = getShape(legendEntriesShape || entry.shape || "square");
1659
1592
  return /*#__PURE__*/ jsx("svg", {
@@ -1729,7 +1662,7 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1729
1662
  active: true,
1730
1663
  size: undefined,
1731
1664
  },
1732
- ])
1665
+ ]),
1733
1666
  );
1734
1667
  };
1735
1668
  _proto.prepareData = function prepareData(context, instance) {
@@ -1787,7 +1720,7 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1787
1720
  }),
1788
1721
  (_this$CSS$element["color-" + entry.colorIndex] =
1789
1722
  entry.colorIndex != null && (isUndefined(entry.active) || entry.active)),
1790
- _this$CSS$element)
1723
+ _this$CSS$element),
1791
1724
  );
1792
1725
  var shape = getShape(entry.shape || "square");
1793
1726
  return /*#__PURE__*/ jsx(
@@ -1804,7 +1737,7 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1804
1737
  className: className,
1805
1738
  }),
1806
1739
  },
1807
- "svg"
1740
+ "svg",
1808
1741
  );
1809
1742
  };
1810
1743
  return LegendEntry;
@@ -1833,7 +1766,7 @@ var ColorMap = /*#__PURE__*/ (function (_Widget) {
1833
1766
  step: undefined,
1834
1767
  size: undefined,
1835
1768
  },
1836
- ])
1769
+ ]),
1837
1770
  );
1838
1771
  };
1839
1772
  _proto.explore = function explore(context, instance) {
@@ -1964,7 +1897,7 @@ var Marker = /*#__PURE__*/ (function (_BoundedObject) {
1964
1897
  name: undefined,
1965
1898
  active: true,
1966
1899
  },
1967
- ])
1900
+ ]),
1968
1901
  );
1969
1902
  };
1970
1903
  _proto.prepareData = function prepareData(context, instance) {
@@ -2064,7 +1997,7 @@ var Marker = /*#__PURE__*/ (function (_BoundedObject) {
2064
1997
  shouldUpdate: instance.shouldUpdate,
2065
1998
  children: this.renderChildren(context, instance),
2066
1999
  },
2067
- key
2000
+ key,
2068
2001
  );
2069
2002
  };
2070
2003
  _proto.handleMouseDown = function handleMouseDown(e, instance) {
@@ -2084,7 +2017,7 @@ var Marker = /*#__PURE__*/ (function (_BoundedObject) {
2084
2017
  svgEl: svgEl,
2085
2018
  el: e.target,
2086
2019
  },
2087
- e.target.style.cursor
2020
+ e.target.style.cursor,
2088
2021
  );
2089
2022
  } else {
2090
2023
  if (!this.selection.isDummy) this.selection.selectInstance(instance);
@@ -2163,7 +2096,7 @@ var MarkerComponent = /*#__PURE__*/ (function (_VDOM$Component) {
2163
2096
  ((_CSS$element = {}),
2164
2097
  (_CSS$element["color-" + data.colorIndex] = data.colorIndex != null),
2165
2098
  (_CSS$element.selected = data.selected),
2166
- _CSS$element)
2099
+ _CSS$element),
2167
2100
  ),
2168
2101
  style: data.style,
2169
2102
  cx: (bounds.l + bounds.r) / 2,
@@ -2236,7 +2169,7 @@ var MarkerLine = /*#__PURE__*/ (function (_BoundedObject) {
2236
2169
  name: undefined,
2237
2170
  legend: undefined,
2238
2171
  },
2239
- ])
2172
+ ]),
2240
2173
  );
2241
2174
  };
2242
2175
  _proto.explore = function explore(context, instance) {
@@ -2320,7 +2253,7 @@ var MarkerLine = /*#__PURE__*/ (function (_BoundedObject) {
2320
2253
  this.renderChildren(context, instance),
2321
2254
  ],
2322
2255
  },
2323
- key
2256
+ key,
2324
2257
  );
2325
2258
  };
2326
2259
  return MarkerLine;
@@ -2355,7 +2288,7 @@ var Range = /*#__PURE__*/ (function (_BoundedObject) {
2355
2288
  name: undefined,
2356
2289
  legend: undefined,
2357
2290
  },
2358
- ])
2291
+ ]),
2359
2292
  );
2360
2293
  };
2361
2294
  _proto.explore = function explore(context, instance) {
@@ -2444,7 +2377,7 @@ var Range = /*#__PURE__*/ (function (_BoundedObject) {
2444
2377
  this.renderChildren(context, instance),
2445
2378
  ],
2446
2379
  },
2447
- key
2380
+ key,
2448
2381
  );
2449
2382
  };
2450
2383
  _proto.handleClick = function handleClick(e, instance) {
@@ -2482,7 +2415,7 @@ var Range = /*#__PURE__*/ (function (_BoundedObject) {
2482
2415
  },
2483
2416
  null,
2484
2417
  captureData,
2485
- e.target.style.cursor
2418
+ e.target.style.cursor,
2486
2419
  );
2487
2420
  }
2488
2421
  };
@@ -2574,7 +2507,7 @@ var Gridlines = /*#__PURE__*/ (function (_BoundedObject) {
2574
2507
  d: path,
2575
2508
  }),
2576
2509
  },
2577
- key
2510
+ key,
2578
2511
  );
2579
2512
  };
2580
2513
  return Gridlines;
@@ -2620,7 +2553,7 @@ var LineGraph = /*#__PURE__*/ (function (_Widget) {
2620
2553
  stack: undefined,
2621
2554
  stacked: undefined,
2622
2555
  },
2623
- ])
2556
+ ]),
2624
2557
  );
2625
2558
  };
2626
2559
  _proto.prepareData = function prepareData(context, instance) {
@@ -2763,7 +2696,7 @@ var LineGraph = /*#__PURE__*/ (function (_Widget) {
2763
2696
  className: data.classNames,
2764
2697
  children: [line, area],
2765
2698
  },
2766
- key
2699
+ key,
2767
2700
  );
2768
2701
  };
2769
2702
  return LineGraph;
@@ -2819,7 +2752,7 @@ var ColumnBarGraphBase = /*#__PURE__*/ (function (_Widget) {
2819
2752
  stack: undefined,
2820
2753
  borderRadius: undefined,
2821
2754
  },
2822
- ])
2755
+ ]),
2823
2756
  );
2824
2757
  };
2825
2758
  _proto.prepareData = function prepareData(context, instance) {
@@ -2873,7 +2806,7 @@ var ColumnBarGraphBase = /*#__PURE__*/ (function (_Widget) {
2873
2806
  className: data.classNames,
2874
2807
  children: data.active && this.renderGraph(context, instance),
2875
2808
  },
2876
- key
2809
+ key,
2877
2810
  );
2878
2811
  };
2879
2812
  _proto.handleClick = function handleClick(e, instance, point, index) {
@@ -3000,7 +2933,7 @@ var ColumnGraph = /*#__PURE__*/ (function (_ColumnBarGraphBase) {
3000
2933
  onMouseLeave: mleave,
3001
2934
  rx: data.borderRadius,
3002
2935
  },
3003
- i
2936
+ i,
3004
2937
  );
3005
2938
  });
3006
2939
  };
@@ -3111,7 +3044,7 @@ var BarGraph = /*#__PURE__*/ (function (_ColumnBarGraphBase) {
3111
3044
  onMouseLeave: mleave,
3112
3045
  rx: data.borderRadius,
3113
3046
  },
3114
- i
3047
+ i,
3115
3048
  );
3116
3049
  });
3117
3050
  };
@@ -3154,7 +3087,7 @@ var ScatterGraph = /*#__PURE__*/ (function (_Widget) {
3154
3087
  active: true,
3155
3088
  },
3156
3089
  selection,
3157
- ])
3090
+ ]),
3158
3091
  );
3159
3092
  };
3160
3093
  _proto.prepareData = function prepareData(context, instance) {
@@ -3214,7 +3147,7 @@ var ScatterGraph = /*#__PURE__*/ (function (_Widget) {
3214
3147
  className: data.classNames,
3215
3148
  children: this.renderData(context, instance),
3216
3149
  },
3217
- key
3150
+ key,
3218
3151
  );
3219
3152
  };
3220
3153
  _proto.renderData = function renderData(context, instance) {
@@ -3238,7 +3171,7 @@ var ScatterGraph = /*#__PURE__*/ (function (_Widget) {
3238
3171
  selectable: !_this3.selection.isDummy,
3239
3172
  }),
3240
3173
  (_CSS$element["color-" + data.colorIndex] = data.colorIndex != null),
3241
- _CSS$element)
3174
+ _CSS$element),
3242
3175
  );
3243
3176
  var cx = xAxis.map(p[_this3.xField]),
3244
3177
  cy = yAxis.map(p[_this3.yField]),
@@ -3297,7 +3230,7 @@ var BubbleGraph = /*#__PURE__*/ (function (_Widget) {
3297
3230
  },
3298
3231
  },
3299
3232
  selection,
3300
- ])
3233
+ ]),
3301
3234
  );
3302
3235
  };
3303
3236
  _proto.init = function init() {
@@ -3331,7 +3264,7 @@ var BubbleGraph = /*#__PURE__*/ (function (_Widget) {
3331
3264
  className: data.classNames,
3332
3265
  children: this.renderData(context, instance),
3333
3266
  },
3334
- key
3267
+ key,
3335
3268
  );
3336
3269
  };
3337
3270
  _proto.renderData = function renderData(context, instance) {
@@ -3360,7 +3293,7 @@ var BubbleGraph = /*#__PURE__*/ (function (_Widget) {
3360
3293
  _this2.onBubbleClick(e, instance, i);
3361
3294
  },
3362
3295
  },
3363
- i
3296
+ i,
3364
3297
  );
3365
3298
  })
3366
3299
  );
@@ -3399,7 +3332,7 @@ var MouseTracker = /*#__PURE__*/ (function (_BoundedObject) {
3399
3332
  x: undefined,
3400
3333
  y: undefined,
3401
3334
  },
3402
- ])
3335
+ ]),
3403
3336
  );
3404
3337
  };
3405
3338
  _proto.explore = function explore(context, instance) {
@@ -3434,7 +3367,7 @@ var MouseTracker = /*#__PURE__*/ (function (_BoundedObject) {
3434
3367
  this.renderChildren(context, instance),
3435
3368
  ],
3436
3369
  },
3437
- key
3370
+ key,
3438
3371
  );
3439
3372
  };
3440
3373
  _proto.handleMouseMove = function handleMouseMove(e, instance) {
@@ -3534,7 +3467,7 @@ var NumericAxis = /*#__PURE__*/ (function (_Axis) {
3534
3467
  lowerDeadZone: undefined,
3535
3468
  upperDeadZone: undefined,
3536
3469
  },
3537
- ])
3470
+ ]),
3538
3471
  );
3539
3472
  };
3540
3473
  _proto.initInstance = function initInstance(context, instance) {
@@ -3561,7 +3494,7 @@ var NumericAxis = /*#__PURE__*/ (function (_Axis) {
3561
3494
  normalized,
3562
3495
  inverted,
3563
3496
  lowerDeadZone,
3564
- upperDeadZone
3497
+ upperDeadZone,
3565
3498
  );
3566
3499
  };
3567
3500
  _proto.render = function render(context, instance, key) {
@@ -3572,7 +3505,7 @@ var NumericAxis = /*#__PURE__*/ (function (_Axis) {
3572
3505
  data.labelDivisor != 1
3573
3506
  ? function (v) {
3574
3507
  return baseFormatter(v / data.labelDivisor);
3575
- }
3508
+ }
3576
3509
  : baseFormatter;
3577
3510
  return /*#__PURE__*/ jsx(
3578
3511
  "g",
@@ -3581,7 +3514,7 @@ var NumericAxis = /*#__PURE__*/ (function (_Axis) {
3581
3514
  style: data.style,
3582
3515
  children: this.renderTicksAndLabels(context, instance, formatter),
3583
3516
  },
3584
- key
3517
+ key,
3585
3518
  );
3586
3519
  };
3587
3520
  NumericAxis.XY = function XY() {
@@ -3624,7 +3557,7 @@ var NumericScale = /*#__PURE__*/ (function () {
3624
3557
  normalized,
3625
3558
  inverted,
3626
3559
  lowerDeadZone,
3627
- upperDeadZone
3560
+ upperDeadZone,
3628
3561
  ) {
3629
3562
  this.min = min;
3630
3563
  this.max = max;
@@ -3746,7 +3679,7 @@ var NumericScale = /*#__PURE__*/ (function () {
3746
3679
  var factor =
3747
3680
  smin < smax
3748
3681
  ? (Math.abs(this.b - this.a) - this.lowerDeadZone - this.upperDeadZone) /
3749
- (smax - smin + minPadding + maxPadding)
3682
+ (smax - smin + minPadding + maxPadding)
3750
3683
  : 0;
3751
3684
  if (factor < 0) factor = 0;
3752
3685
  if (factor > 0 && (this.lowerDeadZone > 0 || this.upperDeadZone > 0)) {
@@ -3890,7 +3823,7 @@ var CategoryAxis = /*#__PURE__*/ (function (_Axis) {
3890
3823
  values: undefined,
3891
3824
  minSize: undefined,
3892
3825
  },
3893
- ])
3826
+ ]),
3894
3827
  );
3895
3828
  };
3896
3829
  _proto.initInstance = function initInstance(context, instance) {
@@ -3920,7 +3853,7 @@ var CategoryAxis = /*#__PURE__*/ (function (_Axis) {
3920
3853
  style: data.style,
3921
3854
  children: this.renderTicksAndLabels(context, instance, formatter),
3922
3855
  },
3923
- key
3856
+ key,
3924
3857
  );
3925
3858
  };
3926
3859
  return CategoryAxis;
@@ -4139,7 +4072,7 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
4139
4072
  lowerDeadZone: undefined,
4140
4073
  upperDeadZone: undefined,
4141
4074
  },
4142
- ])
4075
+ ]),
4143
4076
  );
4144
4077
  };
4145
4078
  _proto.initInstance = function initInstance(context, instance) {
@@ -4166,7 +4099,7 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
4166
4099
  this.minTickUnit,
4167
4100
  lowerDeadZone,
4168
4101
  upperDeadZone,
4169
- this.decode
4102
+ this.decode,
4170
4103
  );
4171
4104
  };
4172
4105
  _proto.render = function render(context, instance, key) {
@@ -4184,7 +4117,7 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
4184
4117
  style: data.style,
4185
4118
  children: this.renderTicksAndLabels(context, instance, formatter),
4186
4119
  },
4187
- key
4120
+ key,
4188
4121
  );
4189
4122
  };
4190
4123
  return TimeAxis;
@@ -4243,7 +4176,7 @@ var TimeScale = /*#__PURE__*/ (function () {
4243
4176
  minTickUnit,
4244
4177
  lowerDeadZone,
4245
4178
  upperDeadZone,
4246
- decode
4179
+ decode,
4247
4180
  ) {
4248
4181
  this.dateCache = {};
4249
4182
  this.min = min != null ? this.decodeValue(min) : null;
@@ -4491,53 +4424,54 @@ var TimeScale = /*#__PURE__*/ (function () {
4491
4424
  var _this3 = this;
4492
4425
  var minReached = false;
4493
4426
  var _loop = function _loop() {
4494
- if (!minReached) {
4495
- if (unit == _this3.minTickUnit) minReached = true;
4496
- else return "continue";
4497
- }
4498
- var unitSize = miliSeconds[unit];
4499
- var divisions = _this3.tickDivisions[unit];
4500
- if (_this3.tickSizes.length > 0) {
4501
- var _this3$tickSizes;
4502
- //add ticks from higher levels
4503
- (_this3$tickSizes = _this3.tickSizes).push.apply(
4504
- _this3$tickSizes,
4505
- divisions[0].map(function (s) {
4427
+ if (!minReached) {
4428
+ if (unit == _this3.minTickUnit) minReached = true;
4429
+ else return 0; // continue
4430
+ }
4431
+ var unitSize = miliSeconds[unit];
4432
+ var divisions = _this3.tickDivisions[unit];
4433
+ if (_this3.tickSizes.length > 0) {
4434
+ var _this3$tickSizes;
4435
+ //add ticks from higher levels
4436
+ (_this3$tickSizes = _this3.tickSizes).push.apply(
4437
+ _this3$tickSizes,
4438
+ divisions[0].map(function (s) {
4439
+ return s * unitSize;
4440
+ }),
4441
+ );
4442
+ return 0; // continue
4443
+ }
4444
+ var bestLabelDistance = Infinity;
4445
+ var bestTicks = [];
4446
+ var bestScale = _this3.scale;
4447
+ _this3.tickMeasure = unit;
4448
+ var _loop2 = function _loop2() {
4449
+ var divs = divisions[i];
4450
+ var tickSizes = divs.map(function (s) {
4506
4451
  return s * unitSize;
4507
- })
4508
- );
4509
- return "continue";
4510
- }
4511
- var bestLabelDistance = Infinity;
4512
- var bestTicks = [];
4513
- var bestScale = _this3.scale;
4514
- _this3.tickMeasure = unit;
4515
- var _loop2 = function _loop2() {
4516
- var divs = divisions[i];
4517
- var tickSizes = divs.map(function (s) {
4518
- return s * unitSize;
4519
- });
4520
- var scale = _this3.getScale(tickSizes, unit);
4521
- tickSizes.forEach(function (size, level) {
4522
- var tickDistance = size * Math.abs(scale.factor);
4523
- if (tickDistance >= _this3.minTickDistance && tickDistance < bestLabelDistance) {
4524
- bestScale = scale;
4525
- bestTicks = tickSizes;
4526
- bestLabelDistance = tickDistance;
4527
- }
4452
+ });
4453
+ var scale = _this3.getScale(tickSizes, unit);
4454
+ tickSizes.forEach(function (size, level) {
4455
+ var tickDistance = size * Math.abs(scale.factor);
4456
+ if (tickDistance >= _this3.minTickDistance && tickDistance < bestLabelDistance) {
4457
+ bestScale = scale;
4458
+ bestTicks = tickSizes;
4459
+ bestLabelDistance = tickDistance;
4460
+ }
4461
+ });
4462
+ };
4463
+ for (var i = 0; i < divisions.length; i++) {
4464
+ _loop2();
4465
+ }
4466
+ _this3.scale = bestScale;
4467
+ _this3.tickSizes = bestTicks.filter(function (ts) {
4468
+ return ts * Math.abs(bestScale.factor) >= _this3.minTickDistance;
4528
4469
  });
4529
- };
4530
- for (var i = 0; i < divisions.length; i++) {
4531
- _loop2();
4532
- }
4533
- _this3.scale = bestScale;
4534
- _this3.tickSizes = bestTicks.filter(function (ts) {
4535
- return ts * Math.abs(bestScale.factor) >= _this3.minTickDistance;
4536
- });
4537
- };
4470
+ },
4471
+ _ret;
4538
4472
  for (var unit in miliSeconds) {
4539
- var _ret = _loop();
4540
- if (_ret === "continue") continue;
4473
+ _ret = _loop();
4474
+ if (_ret === 0) continue;
4541
4475
  }
4542
4476
  };
4543
4477
  _proto2.getTicks = function getTicks(tickSizes) {
@@ -4660,7 +4594,7 @@ var MinMaxFinder = /*#__PURE__*/ (function (_PointReducer) {
4660
4594
  structured: true,
4661
4595
  },
4662
4596
  },
4663
- ])
4597
+ ]),
4664
4598
  );
4665
4599
  };
4666
4600
  _proto.onInitAccumulator = function onInitAccumulator(acc, _ref) {
@@ -4719,7 +4653,7 @@ var SnapPointFinder = /*#__PURE__*/ (function (_PointReducer) {
4719
4653
  snapRecord: undefined,
4720
4654
  maxDistance: undefined,
4721
4655
  },
4722
- ])
4656
+ ]),
4723
4657
  );
4724
4658
  };
4725
4659
  _proto.onInitAccumulator = function onInitAccumulator(acc, _ref) {
@@ -4765,7 +4699,7 @@ var ValueAtFinder = /*#__PURE__*/ (function (_PointReducer) {
4765
4699
  at: undefined,
4766
4700
  value: undefined,
4767
4701
  },
4768
- ])
4702
+ ]),
4769
4703
  );
4770
4704
  };
4771
4705
  _proto.onInitAccumulator = function onInitAccumulator(acc, _ref) {