cx 24.10.5 → 24.10.6
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 +152 -53
- package/dist/manifest.js +718 -718
- package/package.json +1 -1
- package/src/charts/axis/Axis.js +3 -3
- package/src/charts/axis/NumericAxis.js +1 -1
- package/src/charts/axis/TimeAxis.d.ts +28 -24
- package/src/charts/axis/TimeAxis.js +123 -41
package/dist/charts.js
CHANGED
|
@@ -310,7 +310,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
|
|
|
310
310
|
return instance.calculator;
|
|
311
311
|
};
|
|
312
312
|
_proto.reportData = function reportData(context, instance) {};
|
|
313
|
-
_proto.renderTicksAndLabels = function renderTicksAndLabels(context, instance, valueFormatter) {
|
|
313
|
+
_proto.renderTicksAndLabels = function renderTicksAndLabels(context, instance, valueFormatter, minLabelDistance) {
|
|
314
314
|
var _this = this;
|
|
315
315
|
if (this.hidden) return false;
|
|
316
316
|
var data = instance.data,
|
|
@@ -319,7 +319,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
|
|
|
319
319
|
var bounds = data.bounds;
|
|
320
320
|
var CSS = this.CSS,
|
|
321
321
|
baseClass = this.baseClass;
|
|
322
|
-
var size = calculator.findTickSize(
|
|
322
|
+
var size = calculator.findTickSize(minLabelDistance);
|
|
323
323
|
var labelClass = CSS.expand(CSS.element(baseClass, "label"), data.labelClass);
|
|
324
324
|
var offsetClass = CSS.element(baseClass, "label-offset");
|
|
325
325
|
var x1,
|
|
@@ -353,7 +353,7 @@ var Axis = /*#__PURE__*/ (function (_BoundedObject) {
|
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
355
|
var t = [];
|
|
356
|
-
if (size
|
|
356
|
+
if (!!size && !data.hideLabels) {
|
|
357
357
|
var ticks = calculator.getTicks([size]);
|
|
358
358
|
ticks.forEach(function (serie, si) {
|
|
359
359
|
serie.forEach(function (v, i) {
|
|
@@ -4298,7 +4298,7 @@ var NumericAxis = /*#__PURE__*/ (function (_Axis) {
|
|
|
4298
4298
|
{
|
|
4299
4299
|
className: data.classNames,
|
|
4300
4300
|
style: data.style,
|
|
4301
|
-
children: this.renderTicksAndLabels(context, instance, formatter),
|
|
4301
|
+
children: this.renderTicksAndLabels(context, instance, formatter, this.minLabelDistance),
|
|
4302
4302
|
},
|
|
4303
4303
|
key,
|
|
4304
4304
|
);
|
|
@@ -4841,6 +4841,7 @@ var CategoryScale = /*#__PURE__*/ (function () {
|
|
|
4841
4841
|
return CategoryScale;
|
|
4842
4842
|
})();
|
|
4843
4843
|
|
|
4844
|
+
var _TimeAxis$prototype$m;
|
|
4844
4845
|
Format$1.registerFactory("yearOrMonth", function (format) {
|
|
4845
4846
|
var year = Format$1.parse("datetime;yyyy");
|
|
4846
4847
|
var month = Format$1.parse("datetime;MMM");
|
|
@@ -4870,8 +4871,13 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
|
|
|
4870
4871
|
if (this.labelDx == "auto") this.labelDx = this.vertical ? 0 : "5px";
|
|
4871
4872
|
if (this.deadZone) {
|
|
4872
4873
|
this.lowerDeadZone = this.deadZone;
|
|
4873
|
-
|
|
4874
|
+
pperDeadZone = this.deadZone;
|
|
4874
4875
|
}
|
|
4876
|
+
this.minLabelDistanceFormatOverride = _extends(
|
|
4877
|
+
{},
|
|
4878
|
+
this.minLabelDistanceFormatOverrideDefaults,
|
|
4879
|
+
this.minLabelDistanceFormatOverride,
|
|
4880
|
+
);
|
|
4875
4881
|
_Axis.prototype.init.call(this);
|
|
4876
4882
|
};
|
|
4877
4883
|
_proto.declareData = function declareData() {
|
|
@@ -4907,14 +4913,16 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
|
|
|
4907
4913
|
max,
|
|
4908
4914
|
this.snapToTicks,
|
|
4909
4915
|
this.tickDivisions,
|
|
4910
|
-
this.minTickDistance,
|
|
4911
|
-
this.minLabelDistance,
|
|
4916
|
+
Math.max(1, this.minTickDistance),
|
|
4917
|
+
Math.max(1, this.minLabelDistance),
|
|
4912
4918
|
normalized,
|
|
4913
4919
|
inverted,
|
|
4914
4920
|
this.minTickUnit,
|
|
4915
4921
|
lowerDeadZone,
|
|
4916
4922
|
upperDeadZone,
|
|
4917
4923
|
this.decode,
|
|
4924
|
+
this.useLabelDistanceFormatOverrides ? this.minLabelDistanceFormatOverride : {},
|
|
4925
|
+
this.format,
|
|
4918
4926
|
);
|
|
4919
4927
|
};
|
|
4920
4928
|
_proto.render = function render(context, instance, key) {
|
|
@@ -4923,14 +4931,15 @@ var TimeAxis = /*#__PURE__*/ (function (_Axis) {
|
|
|
4923
4931
|
calculator = instance.calculator;
|
|
4924
4932
|
cached.axis = calculator.hash();
|
|
4925
4933
|
if (!data.bounds.valid()) return null;
|
|
4926
|
-
var format =
|
|
4934
|
+
var format = calculator.resolvedFormat;
|
|
4935
|
+
var minLabelDistance = calculator.resolvedMinLabelDistance;
|
|
4927
4936
|
var formatter = Format$1.parse(format);
|
|
4928
4937
|
return /*#__PURE__*/ jsx(
|
|
4929
4938
|
"g",
|
|
4930
4939
|
{
|
|
4931
4940
|
className: data.classNames,
|
|
4932
4941
|
style: data.style,
|
|
4933
|
-
children: this.renderTicksAndLabels(context, instance, formatter),
|
|
4942
|
+
children: this.renderTicksAndLabels(context, instance, formatter, minLabelDistance),
|
|
4934
4943
|
},
|
|
4935
4944
|
key,
|
|
4936
4945
|
);
|
|
@@ -4956,11 +4965,21 @@ TimeAxis.prototype.tickDivisions = {
|
|
|
4956
4965
|
[10, 50, 100],
|
|
4957
4966
|
],
|
|
4958
4967
|
};
|
|
4968
|
+
var TimeFormats = {
|
|
4969
|
+
fullDateAndTime: "datetime;yyyy MMM dd HH mm ss n",
|
|
4970
|
+
shortMonthDate: "datetime;yyyy MMM dd",
|
|
4971
|
+
};
|
|
4959
4972
|
TimeAxis.prototype.snapToTicks = 0;
|
|
4960
4973
|
TimeAxis.prototype.tickSize = 15;
|
|
4961
4974
|
TimeAxis.prototype.minLabelDistance = 60;
|
|
4962
4975
|
TimeAxis.prototype.minTickDistance = 60;
|
|
4963
4976
|
TimeAxis.prototype.minTickUnit = "second";
|
|
4977
|
+
TimeAxis.prototype.useLabelDistanceFormatOverrides = false;
|
|
4978
|
+
TimeAxis.prototype.minLabelDistanceFormatOverrideDefaults =
|
|
4979
|
+
((_TimeAxis$prototype$m = {}),
|
|
4980
|
+
(_TimeAxis$prototype$m[TimeFormats.fullDateAndTime] = 150),
|
|
4981
|
+
(_TimeAxis$prototype$m[TimeFormats.shortMonthDate] = 90),
|
|
4982
|
+
_TimeAxis$prototype$m);
|
|
4964
4983
|
function monthNumber(date) {
|
|
4965
4984
|
return date.getFullYear() * 12 + date.getMonth() + (date.getDate() - 1) / 31;
|
|
4966
4985
|
}
|
|
@@ -4992,6 +5011,8 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
4992
5011
|
lowerDeadZone,
|
|
4993
5012
|
upperDeadZone,
|
|
4994
5013
|
decode,
|
|
5014
|
+
minLabelDistanceFormatOverride,
|
|
5015
|
+
format,
|
|
4995
5016
|
) {
|
|
4996
5017
|
this.dateCache = {};
|
|
4997
5018
|
this.min = min != null ? this.decodeValue(min) : null;
|
|
@@ -5012,6 +5033,8 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5012
5033
|
delete this.maxValuePadded;
|
|
5013
5034
|
this.stacks = {};
|
|
5014
5035
|
this.decode = decode;
|
|
5036
|
+
this.minLabelDistanceFormatOverride = minLabelDistanceFormatOverride;
|
|
5037
|
+
this.format = format;
|
|
5015
5038
|
};
|
|
5016
5039
|
_proto2.decodeValue = function decodeValue(date) {
|
|
5017
5040
|
if (date instanceof Date) return date.getTime();
|
|
@@ -5030,22 +5053,22 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5030
5053
|
_proto2.encodeValue = function encodeValue(v) {
|
|
5031
5054
|
return new Date(v).toISOString();
|
|
5032
5055
|
};
|
|
5033
|
-
_proto2.getFormat = function getFormat() {
|
|
5034
|
-
switch (
|
|
5056
|
+
_proto2.getFormat = function getFormat(unit, scale) {
|
|
5057
|
+
switch (unit) {
|
|
5035
5058
|
case "year":
|
|
5036
5059
|
return "datetime;yyyy";
|
|
5037
5060
|
case "month":
|
|
5038
|
-
if (new Date(
|
|
5061
|
+
if (new Date(scale.min).getFullYear() != new Date(scale.max).getFullYear()) return "yearOrMonth";
|
|
5039
5062
|
return "datetime;yyyy MMM";
|
|
5040
5063
|
case "week":
|
|
5041
5064
|
return "datetime;MMMdd";
|
|
5042
5065
|
case "day":
|
|
5043
5066
|
if (
|
|
5044
|
-
new Date(
|
|
5045
|
-
new Date(
|
|
5067
|
+
new Date(scale.min).getFullYear() != new Date(scale.max).getFullYear() ||
|
|
5068
|
+
new Date(scale.min).getMonth() != new Date(scale.max).getMonth()
|
|
5046
5069
|
)
|
|
5047
5070
|
return "monthOrDay";
|
|
5048
|
-
return
|
|
5071
|
+
return TimeFormats.shortMonthDate;
|
|
5049
5072
|
case "hour":
|
|
5050
5073
|
return "datetime;HH mm n";
|
|
5051
5074
|
case "minute":
|
|
@@ -5053,7 +5076,7 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5053
5076
|
case "second":
|
|
5054
5077
|
return "datetime;mm ss";
|
|
5055
5078
|
default:
|
|
5056
|
-
return
|
|
5079
|
+
return TimeFormats.fullDateAndTime;
|
|
5057
5080
|
}
|
|
5058
5081
|
};
|
|
5059
5082
|
_proto2.map = function map(v, offset) {
|
|
@@ -5124,27 +5147,28 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5124
5147
|
else this.max = this.normalized ? 1 : 100;
|
|
5125
5148
|
}
|
|
5126
5149
|
this.origin = this.inverted ? this.b : this.a;
|
|
5127
|
-
this.scale = this.getScale();
|
|
5128
5150
|
this.calculateTicks();
|
|
5151
|
+
if (this.scale == null) {
|
|
5152
|
+
this.scale = this.getScale();
|
|
5153
|
+
}
|
|
5129
5154
|
};
|
|
5130
5155
|
_proto2.getTimezoneOffset = function getTimezoneOffset(date) {
|
|
5131
5156
|
return date.getTimezoneOffset() * 60 * 1000;
|
|
5132
5157
|
};
|
|
5133
|
-
_proto2.getScale = function getScale(
|
|
5158
|
+
_proto2.getScale = function getScale(tickSize, measure) {
|
|
5134
5159
|
var min = this.min,
|
|
5135
5160
|
max = this.max,
|
|
5136
5161
|
upperDeadZone = this.upperDeadZone,
|
|
5137
5162
|
lowerDeadZone = this.lowerDeadZone;
|
|
5138
5163
|
var smin = min;
|
|
5139
5164
|
var smax = max;
|
|
5140
|
-
if (
|
|
5141
|
-
var tickSize = tickSizes[Math.min(tickSizes.length - 1, this.snapToTicks)];
|
|
5165
|
+
if (tickSize) {
|
|
5142
5166
|
var minDate = new Date(min);
|
|
5143
5167
|
var maxDate = new Date(max);
|
|
5144
5168
|
switch (measure) {
|
|
5145
5169
|
case "second":
|
|
5146
5170
|
case "minute":
|
|
5147
|
-
case "
|
|
5171
|
+
case "hour":
|
|
5148
5172
|
case "day":
|
|
5149
5173
|
default:
|
|
5150
5174
|
var minOffset = this.getTimezoneOffset(minDate);
|
|
@@ -5228,8 +5252,9 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5228
5252
|
};
|
|
5229
5253
|
_proto2.findTickSize = function findTickSize(minPxDist) {
|
|
5230
5254
|
var _this2 = this;
|
|
5231
|
-
return this.tickSizes.find(function (
|
|
5232
|
-
|
|
5255
|
+
return this.tickSizes.find(function (_ref) {
|
|
5256
|
+
var size = _ref.size;
|
|
5257
|
+
return size * Math.abs(_this2.scale.factor) >= minPxDist;
|
|
5233
5258
|
});
|
|
5234
5259
|
};
|
|
5235
5260
|
_proto2.getTickSizes = function getTickSizes() {
|
|
@@ -5238,7 +5263,7 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5238
5263
|
_proto2.calculateTicks = function calculateTicks() {
|
|
5239
5264
|
var _this3 = this;
|
|
5240
5265
|
var minReached = false;
|
|
5241
|
-
var _loop = function _loop() {
|
|
5266
|
+
var _loop = function _loop(unit) {
|
|
5242
5267
|
if (!minReached) {
|
|
5243
5268
|
if (unit == _this3.minTickUnit) minReached = true;
|
|
5244
5269
|
else return 0; // continue
|
|
@@ -5251,73 +5276,147 @@ var TimeScale = /*#__PURE__*/ (function () {
|
|
|
5251
5276
|
(_this3$tickSizes = _this3.tickSizes).push.apply(
|
|
5252
5277
|
_this3$tickSizes,
|
|
5253
5278
|
divisions[0].map(function (s) {
|
|
5254
|
-
return
|
|
5279
|
+
return {
|
|
5280
|
+
size: s * unitSize,
|
|
5281
|
+
measure: unit,
|
|
5282
|
+
};
|
|
5255
5283
|
}),
|
|
5256
5284
|
);
|
|
5257
|
-
return
|
|
5285
|
+
return 1; // break
|
|
5258
5286
|
}
|
|
5259
5287
|
var bestLabelDistance = Infinity;
|
|
5288
|
+
var bestMinLabelDistance = _this3.minLabelDistance;
|
|
5260
5289
|
var bestTicks = [];
|
|
5261
|
-
var bestScale =
|
|
5290
|
+
var bestScale = null;
|
|
5291
|
+
var bestFormat = null;
|
|
5262
5292
|
_this3.tickMeasure = unit;
|
|
5263
|
-
var
|
|
5264
|
-
var
|
|
5265
|
-
var
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
var
|
|
5271
|
-
|
|
5293
|
+
for (var _i = 0; _i < divisions.length; _i++) {
|
|
5294
|
+
var _divs = divisions[_i];
|
|
5295
|
+
for (var _d = 0; _d < _divs.length; _d++) {
|
|
5296
|
+
var _this3$format, _this3$minLabelDistan;
|
|
5297
|
+
//if (useSnapToTicks && d < Math.min(divs.length - 1, this.snapToTicks)) continue;
|
|
5298
|
+
var _tickSize2 = _divs[_d] * unitSize;
|
|
5299
|
+
var scale = _this3.getScale(null, unit);
|
|
5300
|
+
var format = (_this3$format = _this3.format) != null ? _this3$format : _this3.getFormat(unit, scale);
|
|
5301
|
+
var minLabelDistance =
|
|
5302
|
+
(_this3$minLabelDistan = _this3.minLabelDistanceFormatOverride[format]) != null
|
|
5303
|
+
? _this3$minLabelDistan
|
|
5304
|
+
: _this3.minLabelDistance;
|
|
5305
|
+
var labelDistance = _tickSize2 * Math.abs(scale.factor);
|
|
5306
|
+
if (labelDistance >= minLabelDistance && labelDistance < bestLabelDistance) {
|
|
5272
5307
|
bestScale = scale;
|
|
5273
|
-
bestTicks =
|
|
5274
|
-
|
|
5308
|
+
bestTicks = _divs.map(function (s) {
|
|
5309
|
+
return s * unitSize;
|
|
5310
|
+
});
|
|
5311
|
+
bestLabelDistance = labelDistance;
|
|
5312
|
+
bestFormat = format;
|
|
5313
|
+
bestMinLabelDistance = minLabelDistance;
|
|
5275
5314
|
}
|
|
5276
|
-
}
|
|
5277
|
-
};
|
|
5278
|
-
for (var i = 0; i < divisions.length; i++) {
|
|
5279
|
-
_loop2();
|
|
5315
|
+
}
|
|
5280
5316
|
}
|
|
5281
5317
|
_this3.scale = bestScale;
|
|
5282
|
-
_this3.tickSizes = bestTicks
|
|
5283
|
-
|
|
5284
|
-
|
|
5318
|
+
_this3.tickSizes = bestTicks
|
|
5319
|
+
.filter(function (ts) {
|
|
5320
|
+
return ts * Math.abs(bestScale.factor) >= _this3.minTickDistance;
|
|
5321
|
+
})
|
|
5322
|
+
.map(function (size) {
|
|
5323
|
+
return {
|
|
5324
|
+
size: size,
|
|
5325
|
+
measure: _this3.tickMeasure,
|
|
5326
|
+
};
|
|
5327
|
+
});
|
|
5328
|
+
_this3.resolvedFormat = bestFormat;
|
|
5329
|
+
_this3.resolvedMinLabelDistance = bestMinLabelDistance;
|
|
5285
5330
|
},
|
|
5286
5331
|
_ret;
|
|
5287
5332
|
for (var unit in miliSeconds) {
|
|
5288
|
-
_ret = _loop();
|
|
5333
|
+
_ret = _loop(unit);
|
|
5289
5334
|
if (_ret === 0) continue;
|
|
5335
|
+
if (_ret === 1) break;
|
|
5336
|
+
}
|
|
5337
|
+
var lowerTickUnit = null;
|
|
5338
|
+
switch (this.tickMeasure) {
|
|
5339
|
+
case "year":
|
|
5340
|
+
lowerTickUnit = "month";
|
|
5341
|
+
break;
|
|
5342
|
+
case "month":
|
|
5343
|
+
lowerTickUnit = "day";
|
|
5344
|
+
break;
|
|
5345
|
+
case "week":
|
|
5346
|
+
lowerTickUnit = "day";
|
|
5347
|
+
break;
|
|
5348
|
+
case "day":
|
|
5349
|
+
lowerTickUnit = "hour";
|
|
5350
|
+
break;
|
|
5351
|
+
case "hour":
|
|
5352
|
+
lowerTickUnit = "minute";
|
|
5353
|
+
break;
|
|
5354
|
+
case "minute":
|
|
5355
|
+
lowerTickUnit = "second";
|
|
5356
|
+
break;
|
|
5357
|
+
}
|
|
5358
|
+
if (lowerTickUnit != null && this.scale) {
|
|
5359
|
+
var bestMinorTickSize = Infinity;
|
|
5360
|
+
var divisions = this.tickDivisions[lowerTickUnit];
|
|
5361
|
+
var unitSize = miliSeconds[lowerTickUnit];
|
|
5362
|
+
for (var i = 0; i < divisions.length; i++) {
|
|
5363
|
+
var divs = divisions[i];
|
|
5364
|
+
for (var d = 0; d < divs.length; d++) {
|
|
5365
|
+
var tickSize = divs[d] * unitSize;
|
|
5366
|
+
if (tickSize * Math.abs(this.scale.factor) >= this.minTickDistance && tickSize < bestMinorTickSize) {
|
|
5367
|
+
bestMinorTickSize = tickSize;
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
}
|
|
5371
|
+
if (bestMinorTickSize != Infinity) {
|
|
5372
|
+
this.tickSizes.unshift({
|
|
5373
|
+
size: bestMinorTickSize,
|
|
5374
|
+
measure: lowerTickUnit,
|
|
5375
|
+
});
|
|
5376
|
+
if (this.tickSizes.length > 1) {
|
|
5377
|
+
var labelStep = this.tickSizes[1].size;
|
|
5378
|
+
var lowerScale = this.getScale(null, lowerTickUnit);
|
|
5379
|
+
if (lowerScale.max - lowerScale.min >= labelStep) this.scale = lowerScale;
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
if (isNumber(this.snapToTicks) && this.snapToTicks >= 0) {
|
|
5384
|
+
var _tickSize = this.tickSizes[Math.min(this.tickSizes.length - 1, this.snapToTicks)];
|
|
5385
|
+
this.scale = this.getScale(_tickSize.size, _tickSize.measure);
|
|
5290
5386
|
}
|
|
5291
5387
|
};
|
|
5292
5388
|
_proto2.getTicks = function getTicks(tickSizes) {
|
|
5293
5389
|
var _this4 = this;
|
|
5294
|
-
return tickSizes.map(function (
|
|
5390
|
+
return tickSizes.map(function (_ref2) {
|
|
5391
|
+
var size = _ref2.size,
|
|
5392
|
+
measure = _ref2.measure;
|
|
5295
5393
|
var result = [],
|
|
5296
5394
|
start,
|
|
5297
5395
|
end,
|
|
5298
5396
|
minDate,
|
|
5299
5397
|
maxDate;
|
|
5300
|
-
if (
|
|
5398
|
+
if (measure == "year") {
|
|
5301
5399
|
size /= miliSeconds.year;
|
|
5302
5400
|
minDate = new Date(_this4.scale.min - _this4.scale.minPadding);
|
|
5303
5401
|
maxDate = new Date(_this4.scale.max + _this4.scale.maxPadding);
|
|
5304
5402
|
start = Math.ceil(yearNumber(minDate) / size) * size;
|
|
5305
5403
|
end = Math.floor(yearNumber(maxDate) / size) * size;
|
|
5306
5404
|
for (var i = start; i <= end; i += size) result.push(new Date(i, 0, 1).getTime());
|
|
5307
|
-
} else if (
|
|
5405
|
+
} else if (measure == "month") {
|
|
5308
5406
|
size /= miliSeconds.month;
|
|
5309
5407
|
minDate = new Date(_this4.scale.min - _this4.scale.minPadding);
|
|
5310
5408
|
maxDate = new Date(_this4.scale.max + _this4.scale.maxPadding);
|
|
5311
5409
|
start = Math.ceil(monthNumber(minDate) / size) * size;
|
|
5312
5410
|
end = Math.floor(monthNumber(maxDate) / size) * size;
|
|
5313
|
-
for (var
|
|
5314
|
-
|
|
5315
|
-
|
|
5411
|
+
for (var _i2 = start; _i2 <= end; _i2 += size)
|
|
5412
|
+
result.push(new Date(Math.floor(_i2 / 12), _i2 % 12, 1).getTime());
|
|
5413
|
+
} else if (measure == "day" || measure == "week") {
|
|
5414
|
+
var multiplier = measure == "week" ? 7 : 1;
|
|
5316
5415
|
size /= miliSeconds.day;
|
|
5317
5416
|
minDate = new Date(_this4.scale.min - _this4.scale.minPadding);
|
|
5318
5417
|
maxDate = new Date(_this4.scale.max + _this4.scale.maxPadding);
|
|
5319
5418
|
var date = zeroTime(minDate);
|
|
5320
|
-
if (
|
|
5419
|
+
if (measure == "week") {
|
|
5321
5420
|
//start on monday
|
|
5322
5421
|
while (date.getDay() != 1) {
|
|
5323
5422
|
date.setDate(date.getDate() + 1);
|