---
id: "packages/active-charts/all-exports/chart-logger"
title: "Chart logger"
description: "ChartDiagnostic, ChartDiagnosticLevel, ChartDiagnosticSink: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/chart-logger"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:chart-logger"
---

# Chart logger

Exported by `@workspace/active-charts`. Generated from the package source; part of [the index of every export](/packages/active-charts/all-exports).

## Types

**ChartDiagnostic**

```ts
interface ChartDiagnostic {
  readonly level: ChartDiagnosticLevel;
  readonly source: string;
  readonly message: string;
  readonly data?: Readonly<Record<string, unknown>>;
}
```

One diagnostic of the charts. `source` names the part that emitted it
(`ActiveCharts`, `ActiveCharts.BarChart`); `data` carries structured
detail, with a caught error under `error`.

**ChartDiagnosticLevel**

```ts
type ChartDiagnosticLevel = 'debug' | 'warn' | 'error';
```

How serious a chart diagnostic is.

**ChartDiagnosticSink**

```ts
type ChartDiagnosticSink = (diagnostic: ChartDiagnostic) => void;
```

Where the charts deliver their diagnostics. Supplied by the host.
