From 3590ca2632b92facf5119db49f918c783adf82e7 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Wed, 26 Sep 2018 15:18:46 +0200 Subject: [PATCH] Added constant --- public/app/features/explore/Graph.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/explore/Graph.tsx b/public/app/features/explore/Graph.tsx index 29167dcc4c4..89e48b9d5d1 100644 --- a/public/app/features/explore/Graph.tsx +++ b/public/app/features/explore/Graph.tsx @@ -9,6 +9,8 @@ import TimeSeries from 'app/core/time_series2'; import Legend from './Legend'; +const MAX_NUMBER_OF_TIME_SERIES = 20; + // Copied from graph.ts function time_format(ticks, min, max) { if (min && max && ticks) { @@ -74,7 +76,7 @@ class Graph extends Component { getGraphData() { const { data } = this.props; - return this.state.showAllTimeSeries ? data : data.slice(0, 20); + return this.state.showAllTimeSeries ? data : data.slice(0, MAX_NUMBER_OF_TIME_SERIES); } componentDidMount() {