> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperprop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tables

> Pin tables of text to a pane corner, with per-table and per-cell alignment.

Tables are pinned to the pane, not to bars. They stay in their corner while
you scroll and zoom the chart, like Pine's `table.new(position.top_right, …)`.
Tables paint on top of everything else in the pane.

```js theme={null}
tables: [{
  position?,   // where the table sits (default 'top-right')
  cells,       // rows of cells
  bg?,         // table background color
  border?,     // border color
  textColor?,  // default text color
  size?,       // font size in px, default 11
  align?,      // 'left' (default) | 'center' | 'right' for every cell
}]
```

## Cells

`cells` is an array of rows; each row is an array of cells. A cell is a string,
a number, or an object:

```js theme={null}
{ text, color?, bg?, align? }
```

## Alignment

Set `align` on the table to align every cell, or on a single cell to override
it. Values are `'left'` (default), `'center'` and `'right'`. Pine's
`text.align_left`, `text.align_center` and `text.align_right` spellings also
work.

## Position

| | Left | Center | Right |
| - | - | - | - |
| Top | `'top-left'` | `'top-center'` | `'top-right'` (default) |
| Middle | `'middle-left'` | `'middle-center'` | `'middle-right'` |
| Bottom | `'bottom-left'` | `'bottom-center'` | `'bottom-right'` |

Pine's underscore spelling, such as `'top_right'`, works too.

## Example: centered stats table

```js theme={null}
const length = input.int('RSI length', 14, { min: 2, max: 100 });

function compute(bars, inputs, hp, chart) {
  const closes = bars.map(b => b.c);
  const rsi = hp.rsi(closes, length);
  const last = bars.length - 1;
  const change = last > 0 ? closes[last] - closes[last - 1] : 0;
  return {
    plots: [],
    tables: [{
      position: 'bottom-right',
      align: 'center',
      bg: 'rgba(20,20,20,0.8)',
      border: '#444',
      cells: [
        [{ text: chart.symbol ?? '', color: '#f59e0b' }, chart.timeframe ?? ''],
        ['RSI', rsi[last]?.toFixed(1) ?? '–'],
        ['Change', { text: change.toFixed(2), color: change >= 0 ? '#26a69a' : '#ef5350', align: 'right' }],
      ],
    }],
  };
}
```

The whole table is centered; the last value cell overrides that with
`align: 'right'`.

## Limits

Up to **20 tables** per script, each with up to **100 rows** and **20 columns**.


## Related topics

- [Examples](https://docs.hyperprop.com/indicators/examples.md)
- [Limits](https://docs.hyperprop.com/indicators/limits.md)
- [Other timeframes](https://docs.hyperprop.com/indicators/other-timeframes.md)
- [Porting from Pine Script](https://docs.hyperprop.com/indicators/pine-porting.md)
- [Custom indicators](https://docs.hyperprop.com/indicators/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.