API Reference@grafana/data › roundInterval

rangeUtil.roundInterval() function

rangeUtil.roundInterval() function

Signature

export declare function roundInterval(interval: number): 10 | 1000 | 20 | 50 | 100 | 200 | 500 | 2000 | 5000 | 10000 | 15000 | 20000 | 30000 | 60000 | 120000 | 300000 | 600000 | 900000 | 1200000 | 1800000 | 3600000 | 7200000 | 10800000 | 21600000 | 43200000 | 86400000 | 604800000 | 2592000000 | 31536000000;

Import

import { rangeUtil } from '@grafana/data';
const { roundInterval } = rangeUtil;

Parameters

Parameter Type Description
interval number

Returns:

10 | 1000 | 20 | 50 | 100 | 200 | 500 | 2000 | 5000 | 10000 | 15000 | 20000 | 30000 | 60000 | 120000 | 300000 | 600000 | 900000 | 1200000 | 1800000 | 3600000 | 7200000 | 10800000 | 21600000 | 43200000 | 86400000 | 604800000 | 2592000000 | 31536000000