Identifies the calculation family. Keep the literal value when constructing the data object.
Usage example
import type { ChartData } from '@neural-charts/web';
export const dataHeader = {
type: 'arcdiagram',
} satisfies Pick<ChartData, 'type'>;Ordered nodes joined by weighted undirected arcs.
@neural-charts/webarcdiagramContainer width
The chart fits its available space automatically. Choose a width to simulate a different container.
Weighted connections between nodes in their declared order.
| Series | id | label | groupId | from | to | value | Visible |
|---|---|---|---|---|---|---|---|
| nodes | a | Applications | connections | Missing measurement | Missing measurement | Missing measurement | Yes |
| nodes | b | Services | connections | Missing measurement | Missing measurement | Missing measurement | Yes |
| nodes | c | Analytics | connections | Missing measurement | Missing measurement | Missing measurement | Yes |
| links | ab | Missing measurement | Missing measurement | a | b | 12 | Yes |
| links | bc | Missing measurement | Missing measurement | b | c | 8 | Yes |
| links | ca | Missing measurement | Missing measurement | c | a | 4 | Yes |
| groups | connections | Connections | Missing measurement | Missing measurement | Missing measurement | Missing measurement | Yes |
Tap a data point or explore it with the pointer or keyboard.
Adjust the presentation and interaction of this example.
Dense series have a label limit. The table contains the original values.
Open a chart to explore its data, try its options and copy its code.
Use it when source node order matters. Arc thickness represents relation weight. Node radius is a layout choice, not a second measure.
Expand a property to learn when to use it, see its public type, and find examples where applicable.
The property data.type for this family is arcdiagram.
Identifies the calculation family. Keep the literal value when constructing the data object.
import type { ChartData } from '@neural-charts/web';
export const dataHeader = {
type: 'arcdiagram',
} satisfies Pick<ChartData, 'type'>;Declares nodes with stable IDs so links can refer to them.
export type Signature = readonly ({
readonly id: string;
readonly label: string;
readonly groupId?: string | undefined;
} & { readonly color?: never; readonly datum?: never })[];Connects elements by ID. Check the link fields for values supported by this family.
export type Signature = readonly ({
readonly id: string;
readonly from: string;
readonly to: string;
readonly value: number | null;
} & { readonly color?: never; readonly datum?: never })[];Declares groups that observations or nodes may reference by ID.
export type Signature =
| readonly ({ readonly id: string; readonly label: string } & {
readonly color?: never;
readonly datum?: never;
})[]
| undefined;Customize presentation while keeping series and point identities stable.
Applies a palette in series order.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"colors": [
"#2559CC",
"#B52E70"
]
}
};Identify a series by ID and customize its color, stroke, pattern or marker. Use markerFill, markerStroke and markerStrokeWidth to set marker fill and border.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"series": [
{
"id": "visits",
"color": "#2559CC",
"marker": "diamond"
}
]
}
};Adjusts the width of data strokes in pixels.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"lineWidth": 3
}
};Displays values alongside marks in supported families.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"dataLabels": true
}
};Limits how many value labels the renderer considers for placement.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"labelLimit": 12
}
};Chooses how to handle label density: automatic placement, all labels, or truncation.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"dataLabelLayout": "auto"
}
};Sets title alignment, hex color, size and weight. Also applies to SVG and PNG.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"titleStyle": {
"fontSize": 24,
"align": "left"
}
}
};Applies the same text controls to the description below the title.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"descriptionStyle": {
"color": "#405573"
}
}
};Sets the minimum plot width from 0 to 1600 px. In narrow containers the chart scrolls while the title and legend stay in place. The export includes the whole chart.
Default value 0 px
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"minPlotWidth": 580
}
};Reverses the visual layout in supported families such as Funnel or Arc diagram.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Adjusts circular node size in an arc diagram.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Controls the visual width of links in an arc diagram.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Controls whether the legend is shown when the chart has entries.
Default value Visible
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"visible": true
}
};Places the legend. Side positions need at least 600 px of width; narrower charts place it at the bottom.
Default value bottom
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"position": "bottom"
}
};Allows users to show or hide series from the legend.
Default value Enabled
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"interactive": true
}
};Reverses legend entry order while preserving series order in the chart.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"reverse": true
}
};Limits the visible text length of each legend entry.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"maxLabelCharacters": 24
}
};Adjusts spacing between legend entries.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"legend": {
"itemSpacing": 12
}
};Controls the detail shown when exploring an observation.
Default value Enabled
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"enabled": true
}
};Keeps the tooltip within the plot. docked prefers below the point when it fits.
Default value auto
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"placement": "docked"
}
};Lets users pin detail while continuing to explore other observations.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"pinnable": true
}
};Sets the tooltip background to a hex color.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"background": "#17243A"
}
};Sets the tooltip text to a hex color. Choose enough contrast against the background.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"foreground": "#FFFFFF"
}
};Identify the selection and hidden series by ID.
Controls visibility by series ID. An empty array leaves every series visible.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"hiddenSeriesIds": [
"previous"
]
};Applies selection by series and observation identity.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"selectedPoints": [
{
"seriesId": "visits",
"pointId": "day-0"
}
]
};export type Signature =
readonly Readonly<{ seriesId: string; pointId: string }>[] | undefined;Enables entry and transitions provided by the renderer. Respects reduced motion.
Default value Disabled
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"animation": {
"enabled": true
}
};Sets the duration in milliseconds. Zero applies the result immediately.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"animation": {
"duration": 250
}
};Change the revision to request another animation playback.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"animation": {
"revision": 2
}
};import type { ChartOptions } from '@neural-charts/web';
export const options = {
"title": "Measured relations",
"description": "Weighted connections between nodes in their declared order.",
"height": 380,
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
},
"appearance": {
"colors": [
"#2C6DCD",
"#638A35"
],
"markers": false,
"dataLabels": true,
"lineWidth": 2,
"markerRadius": 6
},
"legend": {
"visible": true,
"position": "bottom"
},
"tooltip": {
"enabled": true,
"content": "point",
"placement": "auto",
"crosshair": false
},
"axes": {
"grid": false,
"x": {
"visible": false,
"title": "Day"
},
"y": {
"visible": false,
"title": "Visits"
}
}
} satisfies ChartOptions;Select an observation with the pointer or enter the chart with Tab. Arrow keys navigate the data; Home and End move to the endpoints. Enter or Space selects, and Escape closes the detail.
The data table retains original values, including missing values and hidden series. A repeated label does not merge separate categories. Manual screen reader review remains pending.
Accessibility guideCopy the current input object with its original identifiers and values.