Dont sync graphs if there is only one graph

pull/10616/head
Andrew Watkins 2017-07-27 14:38:57 -07:00
parent 9fcea0500a
commit 753726d0f2
1 changed files with 5 additions and 1 deletions

View File

@ -209,7 +209,11 @@ class DashboardPage extends Component {
const dygraphs = [...this.state.dygraphs, dygraph]
const {dashboards, params} = this.props
const dashboard = dashboards.find(d => d.id === +params.dashboardID)
if (dashboard && dygraphs.length === dashboard.cells.length) {
if (
dashboard &&
dygraphs.length === dashboard.cells.length &&
dashboard.cells.length > 1
) {
Dygraph.synchronize(dygraphs, {
selection: true,
zoom: false,