carbon-addons-data-viz-react
Advanced tools
Comparing version 1.7.7 to 1.8.0
@@ -49,2 +49,3 @@ 'use strict'; | ||
onHover: _propTypes2.default.func, | ||
onMouseOut: _propTypes2.default.func, | ||
emptyText: _propTypes2.default.string, | ||
@@ -73,2 +74,3 @@ isUTC: _propTypes2.default.bool | ||
onHover: function onHover() {}, | ||
onMouseOut: function onMouseOut() {}, | ||
emptyText: 'There is currently no data available for the parameters selected. Please try a different combination.', | ||
@@ -266,5 +268,12 @@ isUTC: false | ||
_this3.onMouseMove(); | ||
}).on('mouseout', function () { | ||
_this3.onMouseOut(); | ||
}); | ||
} | ||
}, { | ||
key: 'onMouseOut', | ||
value: function onMouseOut() { | ||
this.props.onMouseOut(); | ||
} | ||
}, { | ||
key: 'onMouseMove', | ||
@@ -292,3 +301,11 @@ value: function onMouseMove() { | ||
this.props.onHover(d, d3.event.pageX, d3.event.pageY); | ||
var mouseData = { | ||
data: d, | ||
pageX: d3.event.pageX, | ||
pageY: d3.event.pageY, | ||
graphX: this.x(d[1]), | ||
graphY: this.y(d[0]) | ||
}; | ||
this.props.onHover(mouseData); | ||
} | ||
@@ -295,0 +312,0 @@ }, { |
@@ -124,3 +124,5 @@ 'use strict'; | ||
return _react2.default.createElement(_LineGraph2.default, { | ||
data: [[48.633333333333, 1507563000000], [49.933333333333, 1507563900000], [53.733333333333, 1507564800000]] | ||
data: [[48.633333333333, 1507563000000], [12, 1507563900000], [53.733333333333, 1507564800000]], | ||
onHover: (0, _react3.action)('Hover'), | ||
onMouseOut: (0, _react3.action)('Mouseout') | ||
}); | ||
@@ -127,0 +129,0 @@ }).addWithInfo('Empty', ' Empty Example. ', function () { |
@@ -28,2 +28,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
onHover: PropTypes.func, | ||
onMouseOut: PropTypes.func, | ||
emptyText: PropTypes.string, | ||
@@ -52,2 +53,3 @@ isUTC: PropTypes.bool | ||
onHover: function onHover() {}, | ||
onMouseOut: function onMouseOut() {}, | ||
emptyText: 'There is currently no data available for the parameters selected. Please try a different combination.', | ||
@@ -245,5 +247,12 @@ isUTC: false | ||
_this3.onMouseMove(); | ||
}).on('mouseout', function () { | ||
_this3.onMouseOut(); | ||
}); | ||
} | ||
}, { | ||
key: 'onMouseOut', | ||
value: function onMouseOut() { | ||
this.props.onMouseOut(); | ||
} | ||
}, { | ||
key: 'onMouseMove', | ||
@@ -271,3 +280,11 @@ value: function onMouseMove() { | ||
this.props.onHover(d, d3.event.pageX, d3.event.pageY); | ||
var mouseData = { | ||
data: d, | ||
pageX: d3.event.pageX, | ||
pageY: d3.event.pageY, | ||
graphX: this.x(d[1]), | ||
graphY: this.y(d[0]) | ||
}; | ||
this.props.onHover(mouseData); | ||
} | ||
@@ -274,0 +291,0 @@ }, { |
@@ -114,3 +114,5 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
return React.createElement(LineGraph, { | ||
data: [[48.633333333333, 1507563000000], [49.933333333333, 1507563900000], [53.733333333333, 1507564800000]] | ||
data: [[48.633333333333, 1507563000000], [12, 1507563900000], [53.733333333333, 1507564800000]], | ||
onHover: action('Hover'), | ||
onMouseOut: action('Mouseout') | ||
}); | ||
@@ -117,0 +119,0 @@ }).addWithInfo('Empty', ' Empty Example. ', function () { |
{ | ||
"name": "carbon-addons-data-viz-react", | ||
"version": "1.7.7", | ||
"version": "1.8.0", | ||
"description": "Carbon Data Visualization", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
100281
2060