@spider-analyzer/timeline 4.0.0 → 4.0.1

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 CHANGED
@@ -14,6 +14,7 @@ var _round2 = _interopRequireDefault(require("lodash-es/round"));
14
14
  var _max2 = _interopRequireDefault(require("lodash-es/max"));
15
15
  var _floor2 = _interopRequireDefault(require("lodash-es/floor"));
16
16
  var _isEqual = _interopRequireDefault(require("lodash-es/isEqual"));
17
+ var _isFunction = _interopRequireDefault(require("lodash-es/isFunction"));
17
18
  var _Cursor = _interopRequireDefault(require("./Cursor"));
18
19
  var _Histogram = _interopRequireDefault(require("./timeLineElements/Histogram"));
19
20
  var _XAxis = _interopRequireDefault(require("./timeLineElements/XAxis"));
@@ -902,7 +903,7 @@ var TimeLine = /*#__PURE__*/function (_Component) {
902
903
  verticalScale: verticalScale
903
904
  });
904
905
  this.items = items;
905
- return /*#__PURE__*/_react["default"].createElement("svg", {
906
+ return (0, _isFunction["default"])(this.xAxis) && /*#__PURE__*/_react["default"].createElement("svg", {
906
907
  ref: this.timelineElement,
907
908
  width: width,
908
909
  height: height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-analyzer/timeline",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
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
@@ -7,6 +7,7 @@ import _round from 'lodash-es/round';
7
7
  import _max from 'lodash-es/max';
8
8
  import _floor from 'lodash-es/floor';
9
9
  import isEqual from 'lodash-es/isEqual';
10
+ import isFunction from 'lodash-es/isFunction';
10
11
 
11
12
  import Cursor from './Cursor';
12
13
  import Histogram from './timeLineElements/Histogram';
@@ -296,7 +297,7 @@ export default class TimeLine extends Component{
296
297
  const items = this.prepareHistogram({histo, domain, verticalScale});
297
298
  this.items = items;
298
299
 
299
- return (
300
+ return isFunction(this.xAxis) && (
300
301
  <svg
301
302
  ref={this.timelineElement}
302
303
  width={width}