Granularity
Represents the time interval of each candlestick.
ts
type Granularity = 'm1' | 'm2' | 'm3' | 'm5' | 'm10' | 'm15' | 'm30' | 'h1' | 'h2' | 'h4' | 'd1' | 'w1' | 'M1';When to set granularity explicitly
You should usually pass granularity explicitly if your chart:
- can render before data is loaded
- may contain fewer than 2 data points
- uses irregular timestamps
- switches between datasets with different time intervals
Automatic inference is intended for already-loaded, consistently spaced OHLCV series.
| Value | Description |
|---|---|
'm1' | 1 minute |
'm2' | 2 minutes |
'm3' | 3 minutes |
'm5' | 5 minutes |
'm10' | 10 minutes |
'm15' | 15 minutes |
'm30' | 30 minutes |
'h1' | 1 hour |
'h2' | 2 hours |
'h4' | 4 hours |
'd1' | 1 day |
'w1' | 1 week |
'M1' | 1 month |