@spider-analyzer/timeline 4.0.1 → 4.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/TimeLine.js +2 -2
- package/package.json +1 -1
- package/src/TimeLine.jsx +2 -2
package/dist/TimeLine.js
CHANGED
|
@@ -828,8 +828,8 @@ var TimeLine = /*#__PURE__*/function (_Component) {
|
|
|
828
828
|
var start = (0, _momentTimezone["default"])(item.time);
|
|
829
829
|
var end = (0, _momentTimezone["default"])(item.time).add(histo.intervalMs);
|
|
830
830
|
return {
|
|
831
|
-
x1: _this2.xAxis(start),
|
|
832
|
-
x2: _this2.xAxis(end),
|
|
831
|
+
x1: (0, _isFunction["default"])(_this2.xAxis) ? _this2.xAxis(start) : 0,
|
|
832
|
+
x2: (0, _isFunction["default"])(_this2.xAxis) ? _this2.xAxis(end) : 0,
|
|
833
833
|
start: start,
|
|
834
834
|
end: end,
|
|
835
835
|
metrics: item.metrics,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spider-analyzer/timeline",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "React graphical component to display metric over time with a time selection feature.",
|
|
5
5
|
"author": "Thibaut Raballand <spider.analyzer@gmail.com> (https://spider-analyzer.io)",
|
|
6
6
|
"license": "MIT",
|
package/src/TimeLine.jsx
CHANGED
|
@@ -257,8 +257,8 @@ export default class TimeLine extends Component{
|
|
|
257
257
|
const start = moment(item.time);
|
|
258
258
|
const end = moment(item.time).add(histo.intervalMs);
|
|
259
259
|
return {
|
|
260
|
-
x1: this.xAxis(start),
|
|
261
|
-
x2: this.xAxis(end),
|
|
260
|
+
x1: isFunction(this.xAxis) ? this.xAxis(start) : 0,
|
|
261
|
+
x2: isFunction(this.xAxis) ? this.xAxis(end) : 0,
|
|
262
262
|
start,
|
|
263
263
|
end,
|
|
264
264
|
metrics: item.metrics,
|