# ChartAxisProps (@salmonui/charts/chart)

> The ChartAxisProps interface of @salmonui/charts/chart.

Canonical: https://salmonui.dev/docs/reference/charts/chart/ChartAxisProps

```ts
import type { ChartAxisProps } from '@salmonui/charts/chart';
```

Entry index: https://salmonui.dev/docs/reference/charts/chart (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/chart.md).

## Reference

Kind: interface

```ts
interface ChartAxisProps extends ChartAxisOptions {
    readonly direction: 'x' | 'y';
    readonly id?: string | undefined;
}
```

Members (39):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `direction` | `readonly direction: 'x' \| 'y';` |  | `'x'` (category / value axis along the data) or `'y'` (value axis). |
| `id` | `readonly id?: string \| undefined;` | optional | Required except for the primary axes (`'x'`, `'y'`). |
| `scale` | `scale?: ChartScale;` | optional, inherited |  |
| `title` | `title?: string;` | optional, inherited |  |
| `min` | `min?: number \| Date;` | optional, inherited |  |
| `max` | `max?: number \| Date;` | optional, inherited |  |
| `interval` | `interval?: number \| { readonly unit: "day" \| "hour" \| "millisecond" \| "minute" \| "month" \| "second" \| "week" \| "year"; readonly step: number; };` | optional, inherited | Numeric step, or a calendar interval on time axes. |
| `tickCount` | `tickCount?: number;` | optional, inherited |  |
| `includeZero` | `includeZero?: boolean;` | optional, inherited |  |
| `padding` | `padding?: "additional" \| "auto" \| "none" \| "normal" \| "round";` | optional, inherited |  |
| `base` | `base?: number;` | optional, inherited |  |
| `position` | `position?: "end" \| "start";` | optional, inherited | `'start'` (left / bottom) or `'end'` (right / top). |
| `reversed` | `reversed?: boolean;` | optional, inherited |  |
| `hidden` | `hidden?: boolean;` | optional, inherited |  |
| `gridLines` | `gridLines?: "both" \| "major" \| boolean;` | optional, inherited |  |
| `minorTicks` | `minorTicks?: number;` | optional, inherited |  |
| `labelOverlap` | `labelOverlap?: ChartLabelOverlap;` | optional, inherited |  |
| `labelAngle` | `labelAngle?: number;` | optional, inherited |  |
| `maxLabelWidth` | `maxLabelWidth?: number;` | optional, inherited |  |
| `labelPlacement` | `labelPlacement?: "between" \| "on";` | optional, inherited |  |
| `edgeLabels` | `edgeLabels?: "hide" \| "none" \| "shift";` | optional, inherited |  |
| `labelPosition` | `labelPosition?: "inside" \| "outside";` | optional, inherited |  |
| `tickPosition` | `tickPosition?: "inside" \| "outside";` | optional, inherited |  |
| `plotOffset` | `plotOffset?: number;` | optional, inherited | Padding in px between the axis ends and the first and last data positions. |
| `indexed` | `indexed?: boolean;` | optional, inherited | Category axis by point index: duplicate categories stay separate. |
| `ticks` | `ticks?: boolean;` | optional, inherited | `false` hides the tick marks. |
| `line` | `line?: boolean;` | optional, inherited | `false` hides the axis line. |
| `titleAngle` | `titleAngle?: number;` | optional, inherited | Title rotation in degrees (default 0 on horizontal axes, -90 / 90 on vertical ones). |
| `format` | `format?: ChartFormat;` | optional, inherited |  |
| `formatLabel` | `formatLabel?: ((value: unknown) => string);` | optional, inherited |  |
| `renderLabel` | `renderLabel?: ((ctx: ChartAxisLabelContext) => ReactNode);` | optional, inherited | SVG text content for a tick label (a string or `<tspan>`s). |
| `labelGroups` | `labelGroups?: readonly ChartAxisLabelGroup[];` | optional, inherited | Grouped labels below the tick labels (multi-level labels). |
| `bands` | `bands?: readonly ChartAxisBand[];` | optional, inherited |  |
| `lines` | `lines?: readonly ChartAxisLine[];` | optional, inherited |  |
| `domain` | `domain?: ((computed: readonly [number, number]) => readonly [number, number]);` | optional, inherited | Adjust the computed numeric domain (pure). |
| `pane` | `pane?: { readonly row?: number; readonly column?: number; readonly span?: number; };` | optional, inherited |  |
| `startAngle` | `startAngle?: number;` | optional, inherited | Polar and radar x axis: the angle of the first category or value, in degrees clockwise from 12 o'clock. |
| `crossAt` | `crossAt?: { readonly value: number \| Date; readonly axis?: string \| undefined; };` | optional, inherited | Draws the axis line where the crossing axis (default: the primary one) has `value`. |
| `labelsAtCross` | `labelsAtCross?: boolean;` | optional, inherited | With `crossAt`, the labels move with the line (default: they stay at the plot edge). |
