Merge pull request #3636 from influxdata/bugfix/single-stat

Fix line graph + single stat dygraphs
pull/10616/head
Chris Henn 2018-06-12 09:20:20 -07:00 committed by GitHub
commit df03ae5850
1 changed files with 2 additions and 3 deletions

View File

@ -1,9 +1,9 @@
import React, {
Component,
ReactNode,
CSSProperties,
MouseEvent,
ReactElement,
Children,
} from 'react'
import {connect} from 'react-redux'
import _ from 'lodash'
@ -70,7 +70,6 @@ interface Props {
dygraphRef?: (r: HTMLDivElement) => void
onZoom?: (u: number | string, l: number | string) => void
mode?: string
children?: ReactNode
}
interface State {
@ -308,7 +307,7 @@ class Dygraph extends Component<Props, State> {
private get isGraphNested(): boolean {
const {children} = this.props
return _.get(children, '0', false)
return Children.count(children) > 0
}
private get dygraphStyle(): CSSProperties {