Convert hoverTime to string

pull/2940/head
Deniz Kusefoglu 2018-03-06 16:27:14 -08:00
parent b6b64626d1
commit 454e0ac022
8 changed files with 18 additions and 14 deletions

View File

@ -116,7 +116,7 @@ Dashboard.propTypes = {
onDeleteCell: func,
onSummonOverlayTechnologies: func,
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
source: shape({
links: shape({

View File

@ -53,7 +53,7 @@ class DashboardPage extends Component {
zoomedTimeRange: {zoomedLower: null, zoomedUpper: null},
scrollTop: 0,
windowHeight: window.innerHeight,
hoverTime: 0,
hoverTime: '0',
}
}

View File

@ -198,12 +198,16 @@ class Dygraph extends Component {
highlightCallback = (e, x) => {
const {onSetHoverTime} = this.props
onSetHoverTime(x)
if (onSetHoverTime) {
onSetHoverTime(x.toString())
}
}
unhighlightCallback = () => {
const {onSetHoverTime} = this.props
onSetHoverTime(0)
if (onSetHoverTime) {
onSetHoverTime('0')
}
}
hashColorDygraphSeries = () => {
@ -365,7 +369,7 @@ class Dygraph extends Component {
}
}
const {array, arrayOf, bool, func, node, number, shape, string} = PropTypes
const {array, arrayOf, bool, func, node, shape, string} = PropTypes
Dygraph.defaultProps = {
axes: {
@ -420,7 +424,7 @@ Dygraph.propTypes = {
lower: string.isRequired,
}),
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
setResolution: func,
dygraphRef: func,

View File

@ -153,7 +153,7 @@ const propTypes = {
onDeleteCell: func,
onSummonOverlayTechnologies: func,
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
isStatusPage: bool,
isEditable: bool,

View File

@ -190,7 +190,7 @@ LayoutRenderer.propTypes = {
onDeleteCell: func,
onSummonOverlayTechnologies: func,
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
isStatusPage: bool,
isEditable: bool,

View File

@ -190,7 +190,7 @@ LineGraph.propTypes = {
}),
isInDataExplorer: bool,
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
setResolution: func,
cellHeight: number,

View File

@ -142,7 +142,7 @@ RefreshingGraph.propTypes = {
manualRefresh: number,
templates: arrayOf(shape()),
synchronizer: func,
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
type: string.isRequired,
cellHeight: number,

View File

@ -26,13 +26,13 @@ class TableGraph extends Component {
handleHover = (columnIndex, rowIndex) => () => {
const {onSetHoverTime} = this.props
onSetHoverTime(this._data[rowIndex][0])
onSetHoverTime(this._data[rowIndex][0].toString())
this.setState({hoveredColumnIndex: columnIndex, hoveredRowIndex: rowIndex})
}
handleMouseOut = () => {
const {onSetHoverTime} = this.props
onSetHoverTime(0)
onSetHoverTime('0')
this.setState({hoveredColumnIndex: -1, hoveredRowIndex: -1})
}
@ -95,12 +95,12 @@ class TableGraph extends Component {
}
}
const {arrayOf, number, shape, func} = PropTypes
const {arrayOf, number, shape, string, func} = PropTypes
TableGraph.propTypes = {
cellHeight: number,
data: arrayOf(shape()),
hoverTime: number,
hoverTime: string,
onSetHoverTime: func,
}