Convert hoverTime to string
parent
b6b64626d1
commit
454e0ac022
|
@ -116,7 +116,7 @@ Dashboard.propTypes = {
|
||||||
onDeleteCell: func,
|
onDeleteCell: func,
|
||||||
onSummonOverlayTechnologies: func,
|
onSummonOverlayTechnologies: func,
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
source: shape({
|
source: shape({
|
||||||
links: shape({
|
links: shape({
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DashboardPage extends Component {
|
||||||
zoomedTimeRange: {zoomedLower: null, zoomedUpper: null},
|
zoomedTimeRange: {zoomedLower: null, zoomedUpper: null},
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
windowHeight: window.innerHeight,
|
windowHeight: window.innerHeight,
|
||||||
hoverTime: 0,
|
hoverTime: '0',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,12 +198,16 @@ class Dygraph extends Component {
|
||||||
|
|
||||||
highlightCallback = (e, x) => {
|
highlightCallback = (e, x) => {
|
||||||
const {onSetHoverTime} = this.props
|
const {onSetHoverTime} = this.props
|
||||||
onSetHoverTime(x)
|
if (onSetHoverTime) {
|
||||||
|
onSetHoverTime(x.toString())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unhighlightCallback = () => {
|
unhighlightCallback = () => {
|
||||||
const {onSetHoverTime} = this.props
|
const {onSetHoverTime} = this.props
|
||||||
onSetHoverTime(0)
|
if (onSetHoverTime) {
|
||||||
|
onSetHoverTime('0')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hashColorDygraphSeries = () => {
|
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 = {
|
Dygraph.defaultProps = {
|
||||||
axes: {
|
axes: {
|
||||||
|
@ -420,7 +424,7 @@ Dygraph.propTypes = {
|
||||||
lower: string.isRequired,
|
lower: string.isRequired,
|
||||||
}),
|
}),
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
setResolution: func,
|
setResolution: func,
|
||||||
dygraphRef: func,
|
dygraphRef: func,
|
||||||
|
|
|
@ -153,7 +153,7 @@ const propTypes = {
|
||||||
onDeleteCell: func,
|
onDeleteCell: func,
|
||||||
onSummonOverlayTechnologies: func,
|
onSummonOverlayTechnologies: func,
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
isStatusPage: bool,
|
isStatusPage: bool,
|
||||||
isEditable: bool,
|
isEditable: bool,
|
||||||
|
|
|
@ -190,7 +190,7 @@ LayoutRenderer.propTypes = {
|
||||||
onDeleteCell: func,
|
onDeleteCell: func,
|
||||||
onSummonOverlayTechnologies: func,
|
onSummonOverlayTechnologies: func,
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
isStatusPage: bool,
|
isStatusPage: bool,
|
||||||
isEditable: bool,
|
isEditable: bool,
|
||||||
|
|
|
@ -190,7 +190,7 @@ LineGraph.propTypes = {
|
||||||
}),
|
}),
|
||||||
isInDataExplorer: bool,
|
isInDataExplorer: bool,
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
setResolution: func,
|
setResolution: func,
|
||||||
cellHeight: number,
|
cellHeight: number,
|
||||||
|
|
|
@ -142,7 +142,7 @@ RefreshingGraph.propTypes = {
|
||||||
manualRefresh: number,
|
manualRefresh: number,
|
||||||
templates: arrayOf(shape()),
|
templates: arrayOf(shape()),
|
||||||
synchronizer: func,
|
synchronizer: func,
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
type: string.isRequired,
|
type: string.isRequired,
|
||||||
cellHeight: number,
|
cellHeight: number,
|
||||||
|
|
|
@ -26,13 +26,13 @@ class TableGraph extends Component {
|
||||||
|
|
||||||
handleHover = (columnIndex, rowIndex) => () => {
|
handleHover = (columnIndex, rowIndex) => () => {
|
||||||
const {onSetHoverTime} = this.props
|
const {onSetHoverTime} = this.props
|
||||||
onSetHoverTime(this._data[rowIndex][0])
|
onSetHoverTime(this._data[rowIndex][0].toString())
|
||||||
this.setState({hoveredColumnIndex: columnIndex, hoveredRowIndex: rowIndex})
|
this.setState({hoveredColumnIndex: columnIndex, hoveredRowIndex: rowIndex})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseOut = () => {
|
handleMouseOut = () => {
|
||||||
const {onSetHoverTime} = this.props
|
const {onSetHoverTime} = this.props
|
||||||
onSetHoverTime(0)
|
onSetHoverTime('0')
|
||||||
this.setState({hoveredColumnIndex: -1, hoveredRowIndex: -1})
|
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 = {
|
TableGraph.propTypes = {
|
||||||
cellHeight: number,
|
cellHeight: number,
|
||||||
data: arrayOf(shape()),
|
data: arrayOf(shape()),
|
||||||
hoverTime: number,
|
hoverTime: string,
|
||||||
onSetHoverTime: func,
|
onSetHoverTime: func,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue