Convert hoverTime to string
parent
b6b64626d1
commit
454e0ac022
|
@ -116,7 +116,7 @@ Dashboard.propTypes = {
|
|||
onDeleteCell: func,
|
||||
onSummonOverlayTechnologies: func,
|
||||
synchronizer: func,
|
||||
hoverTime: number,
|
||||
hoverTime: string,
|
||||
onSetHoverTime: func,
|
||||
source: shape({
|
||||
links: shape({
|
||||
|
|
|
@ -53,7 +53,7 @@ class DashboardPage extends Component {
|
|||
zoomedTimeRange: {zoomedLower: null, zoomedUpper: null},
|
||||
scrollTop: 0,
|
||||
windowHeight: window.innerHeight,
|
||||
hoverTime: 0,
|
||||
hoverTime: '0',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -153,7 +153,7 @@ const propTypes = {
|
|||
onDeleteCell: func,
|
||||
onSummonOverlayTechnologies: func,
|
||||
synchronizer: func,
|
||||
hoverTime: number,
|
||||
hoverTime: string,
|
||||
onSetHoverTime: func,
|
||||
isStatusPage: bool,
|
||||
isEditable: bool,
|
||||
|
|
|
@ -190,7 +190,7 @@ LayoutRenderer.propTypes = {
|
|||
onDeleteCell: func,
|
||||
onSummonOverlayTechnologies: func,
|
||||
synchronizer: func,
|
||||
hoverTime: number,
|
||||
hoverTime: string,
|
||||
onSetHoverTime: func,
|
||||
isStatusPage: bool,
|
||||
isEditable: bool,
|
||||
|
|
|
@ -190,7 +190,7 @@ LineGraph.propTypes = {
|
|||
}),
|
||||
isInDataExplorer: bool,
|
||||
synchronizer: func,
|
||||
hoverTime: number,
|
||||
hoverTime: string,
|
||||
onSetHoverTime: func,
|
||||
setResolution: func,
|
||||
cellHeight: number,
|
||||
|
|
|
@ -142,7 +142,7 @@ RefreshingGraph.propTypes = {
|
|||
manualRefresh: number,
|
||||
templates: arrayOf(shape()),
|
||||
synchronizer: func,
|
||||
hoverTime: number,
|
||||
hoverTime: string,
|
||||
onSetHoverTime: func,
|
||||
type: string.isRequired,
|
||||
cellHeight: number,
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue