# @salmonui/charts/chart/export API reference

> 3 exported symbols of @salmonui/charts/chart/export: 1 function, 1 interface and 1 type.

Canonical: https://salmonui.dev/docs/reference/charts/chart-export

```ts
import { … } from '@salmonui/charts/chart/export';
```

## Functions

### exportVisualizations

Kind: function

Page: https://salmonui.dev/docs/reference/charts/chart-export/exportVisualizations

```ts
function exportVisualizations(items: readonly ExportableVisualization[], options?: ExportVisualizationsOptions): Promise<Blob>;
```

Exports several visualizations as one image or PDF page.

## Interfaces

### ExportVisualizationsOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/chart-export/ExportVisualizationsOptions

```ts
interface ExportVisualizationsOptions {
    readonly format?: 'png' | 'jpeg' | 'svg' | 'pdf' | undefined;
    readonly direction?: 'vertical' | 'horizontal' | undefined;
    readonly gap?: number | undefined;
    readonly fileName?: string | undefined;
    readonly scale?: number | undefined;
    readonly orientation?: 'portrait' | 'landscape' | undefined;
    readonly pageSize?: string | undefined;
    readonly writers?: Pick<VizExportWriters, 'pdf'> | undefined;
    readonly download?: boolean | undefined;
}
```

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format?: 'png' \| 'jpeg' \| 'svg' \| 'pdf' \| undefined;` | optional | Default `png`. |
| `direction` | `readonly direction?: 'vertical' \| 'horizontal' \| undefined;` | optional | Stack the drawings top to bottom (default) or side by side. |
| `gap` | `readonly gap?: number \| undefined;` | optional | Space between drawings in px. Default 16. |
| `fileName` | `readonly fileName?: string \| undefined;` | optional | Default `visualizations.<format>`. |
| `scale` | `readonly scale?: number \| undefined;` | optional | Raster scale on top of the device pixel ratio. |
| `orientation` | `readonly orientation?: 'portrait' \| 'landscape' \| undefined;` | optional | PDF page orientation and size (`format: 'pdf'`). |
| `pageSize` | `readonly pageSize?: string \| undefined;` | optional |  |
| `writers` | `readonly writers?: Pick<VizExportWriters, 'pdf'> \| undefined;` | optional | `pdf` needs `writers.pdf` (a dynamic import of |
| `download` | `readonly download?: boolean \| undefined;` | optional | Download the file (default true); the promise resolves to it either way. |

## Types

### ExportableVisualization

Kind: type

Page: https://salmonui.dev/docs/reference/charts/chart-export/ExportableVisualization

```ts
type ExportableVisualization = {
    readonly element: Element | null;
} | Element | null | undefined;
```

Anything with the `element` of a visualization instance (every `ref` API), or the element itself.
