cx 24.10.7 → 24.10.9

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
@@ -23,6 +23,7 @@ import {
23
23
  getTopLevelBoundingClientRect,
24
24
  Format,
25
25
  zeroTime,
26
+ Console as Console$1,
26
27
  } from "cx/util";
27
28
  import { jsx, jsxs } from "react/jsx-runtime";
28
29
  import {
@@ -4589,6 +4590,9 @@ var NumericScale = /*#__PURE__*/ (function () {
4589
4590
  for (var i = start; i <= end; i++) result.push(this.map(i * size));
4590
4591
  return result;
4591
4592
  };
4593
+ _proto2.book = function book() {
4594
+ Console.warn("NumericAxis does not support the autoSize flag for column and bar graphs.");
4595
+ };
4592
4596
  return NumericScale;
4593
4597
  })();
4594
4598
 
@@ -5366,6 +5370,8 @@ var TimeScale = /*#__PURE__*/ (function () {
5366
5370
  lowerTickUnit = "second";
5367
5371
  break;
5368
5372
  }
5373
+ if (lowerTickUnit && this.minTickUnit && miliSeconds[lowerTickUnit] < miliSeconds[this.minTickUnit])
5374
+ lowerTickUnit = this.minTickUnit == this.tickMeasure ? null : this.minTickUnit;
5369
5375
  if (lowerTickUnit != null && this.scale) {
5370
5376
  var bestMinorTickSize = Infinity;
5371
5377
  var divisions = this.tickDivisions[lowerTickUnit];
@@ -5392,7 +5398,7 @@ var TimeScale = /*#__PURE__*/ (function () {
5392
5398
  }
5393
5399
  }
5394
5400
  }
5395
- if (isNumber(this.snapToTicks) && this.snapToTicks >= 0) {
5401
+ if (isNumber(this.snapToTicks) && this.snapToTicks >= 0 && this.tickSizes.length > 0) {
5396
5402
  var _tickSize = this.tickSizes[Math.min(this.tickSizes.length - 1, this.snapToTicks)];
5397
5403
  this.scale = this.getScale(_tickSize.size, _tickSize.measure, minRange);
5398
5404
  }
@@ -5428,6 +5434,7 @@ var TimeScale = /*#__PURE__*/ (function () {
5428
5434
  minDate = new Date(_this4.scale.min - _this4.scale.minPadding);
5429
5435
  maxDate = new Date(_this4.scale.max + _this4.scale.maxPadding);
5430
5436
  var date = zeroTime(minDate);
5437
+ while (date.getTime() < minDate.getTime()) date.setDate(date.getDate() + 1);
5431
5438
  if (measure == "week") {
5432
5439
  //start on monday
5433
5440
  while (date.getDay() != 1) {
@@ -5461,6 +5468,9 @@ var TimeScale = /*#__PURE__*/ (function () {
5461
5468
  return _this5.map(x);
5462
5469
  });
5463
5470
  };
5471
+ _proto2.book = function book() {
5472
+ Console$1.warn("TimeAxis does not support the autoSize flag for column and bar graphs.");
5473
+ };
5464
5474
  return TimeScale;
5465
5475
  })();
5466
5476