Commit 3590ca26 by Peter Holmberg

Added constant

parent ff96a6b7
......@@ -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<any, any> {
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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment