mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added constant
This commit is contained in:
parent
ff96a6b766
commit
3590ca2632
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user