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: 'mixed',
} satisfies Pick<ChartData, 'type'>;Compare columns, lines and areas inside one coordinated frame.
@neural-charts/webmixedContainer width
The chart fits its available space automatically. Choose a width to simulate a different container.
Mark a comfortable temperature range on the secondary axis.
| Series | Category X | id | x | y | Visible |
|---|---|---|---|---|---|
| Rainfall | Mon | day-0 | day-0 | 80 | Yes |
| Rainfall | Tue | day-1 | day-1 | 140 | Yes |
| Rainfall | Wed | day-2 | day-2 | 120 | Yes |
| Rainfall | Thu | day-3 | day-3 | 180 | Yes |
| Rainfall | Fri | day-4 | day-4 | 220 | Yes |
| Rainfall | Sat | day-5 | day-5 | 160 | Yes |
| Rainfall | Sun | day-6 | day-6 | 240 | Yes |
| Temperature | Mon | day-0 | day-0 | 16 | Yes |
| Temperature | Tue | day-1 | day-1 | 20 | Yes |
| Temperature | Wed | day-2 | day-2 | 22 | Yes |
| Temperature | Thu | day-3 | day-3 | 25 | Yes |
| Temperature | Fri | day-4 | day-4 | 28 | Yes |
| Temperature | Sat | day-5 | day-5 | 24 | Yes |
| Temperature | Sun | day-6 | day-6 | 18 | 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 a shared Y scale for comparable units. For different measures, declare secondaryY and assign series explicitly; independent values keep their own units and domain.
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 mixed.
Identifies the calculation family. Keep the literal value when constructing the data object.
import type { ChartData } from '@neural-charts/web';
export const dataHeader = {
type: 'mixed',
} satisfies Pick<ChartData, 'type'>;Declares how each axis interprets values. Categories have IDs; dates use UTC milliseconds.
import type { ChartData } from '@neural-charts/web';
export const axes = {
"x": {
"type": "category",
"values": [
{
"id": "day-0",
"label": "Mon"
},
{
"id": "day-1",
"label": "Tue"
},
{
"id": "day-2",
"label": "Wed"
},
{
"id": "day-3",
"label": "Thu"
},
{
"id": "day-4",
"label": "Fri"
},
{
"id": "day-5",
"label": "Sat"
}
]
},
"y": {
"type": "linear",
"domain": [
0,
400
],
"nice": false
},
"secondaryY": {
"type": "linear",
"domain": [
10,
40
],
"nice": false,
"reversed": true
}
} satisfies (ChartData & { type: 'mixed' })['axes'];import type { ChartData } from '@neural-charts/web';
export type Signature = (ChartData & { type: 'mixed' })['axes'];Contains series and observations. Keep IDs when replacing data so selection and legend retain their identity.
import type {
PlanMixedRangeLineSeries,
PlanMixedRangeSeries,
} from '@neural-charts/core';
export type Signature =
| readonly (
| (Omit<
Readonly<{
id: string;
name: string;
data: readonly Readonly<{
id: string;
x: string;
y: number | null;
datum?: unknown;
}>[];
curve?: 'straight' | 'step-before' | 'step-after' | 'step-mid';
gaps?: 'break' | 'connect';
markers?: 'auto' | 'on' | 'off';
dash?: 'solid' | 'dashed' | 'dotted';
color?: string;
}> &
Readonly<{ type: 'line' | 'area' }> &
Readonly<{ yAxis?: 'primary' }>,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly y: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
| (Omit<
Readonly<{
id: string;
name: string;
data: readonly Readonly<{
id: string;
x: string;
y: number | null;
datum?: unknown;
}>[];
color?: string;
}> &
Readonly<{
type: 'column';
curve?: never;
gaps?: never;
markers?: never;
dash?: never;
}> &
Readonly<{ yAxis?: 'primary' }>,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly y: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
)[]
| readonly (
| (Omit<
Readonly<{
id: string;
name: string;
data: readonly Readonly<{
id: string;
x: string;
y: number | null;
datum?: unknown;
}>[];
curve?: 'straight' | 'step-before' | 'step-after' | 'step-mid';
gaps?: 'break' | 'connect';
markers?: 'auto' | 'on' | 'off';
dash?: 'solid' | 'dashed' | 'dotted';
color?: string;
}> &
Readonly<{ type: 'line' | 'area' }> &
Readonly<{ yAxis?: 'primary' | 'secondary' }>,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly y: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
| (Omit<
Readonly<{
id: string;
name: string;
data: readonly Readonly<{
id: string;
x: string;
y: number | null;
datum?: unknown;
}>[];
color?: string;
}> &
Readonly<{
type: 'column';
curve?: never;
gaps?: never;
markers?: never;
dash?: never;
}> &
Readonly<{ yAxis?: 'primary' | 'secondary' }>,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly y: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
)[]
| readonly (
| (Omit<
PlanMixedRangeSeries,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly low: number | null;
readonly high: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
| (Omit<
PlanMixedRangeLineSeries,
'data' | 'markers' | 'dash' | 'color'
> & {
readonly data: readonly ({
readonly id: string;
readonly x: string;
readonly y: number | null;
} & { readonly color?: never; readonly datum?: never })[];
readonly color?: never;
readonly markers?: never;
readonly dash?: never;
})
)[];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"
}
]
}
};Applies styles by series and observation identity on supported marks.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"points": [
{
"seriesId": "visits",
"pointId": "day-0",
"color": "#B52E70"
}
]
}
};Adjusts the width of data strokes in pixels.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"lineWidth": 3
}
};Controls whether markers appear on observations in supported series.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"markers": true
}
};Adjusts the radius of markers drawn by the renderer.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"markerRadius": 4
}
};Displays values alongside marks in supported families.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"appearance": {
"dataLabels": true
}
};Shows stack totals in stacked charts that provide them.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'column'> = {
"appearance": {
"stackLabels": 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
}
};Sets stacking for supported families. sum accumulates values; percent displays proportion on a 0–100 scale.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "person"
},
"gap": 8,
"background": true,
"stacking": "sum"
}
};Data types and domains determine the scale. Use options.axes to change its presentation.
Controls the grid. Visibility, ticks and labels can be configured for each axis.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"axes": {
"grid": true
}
};Configures X-axis presentation. Declare the data axis type in data.axes.x.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"axes": {
"x": {
"title": "Day"
}
}
};Configures presentation of the main value axis, including its number format.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"axes": {
"y": {
"title": "Revenue",
"numberFormat": {
"style": "currency",
"currency": "EUR"
}
}
}
};Configures the secondary axis in charts that support and use that assignment.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"axes": {
"secondaryY": {
"title": "Conversion rate"
}
}
};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
}
};Shows one observation or compares series at the same position when supported.
Default value point
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"content": "shared"
}
};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"
}
};Draws a guide on supported Cartesian charts.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"tooltip": {
"crosshair": true
}
};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.
Applies a domain window and configures zoom controls on supported charts.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions = {
"viewport": {
"axes": "x",
"controls": true,
"pan": true,
"wheel": "ctrl"
}
};import type { PlanViewportValue } from '@neural-charts/core';
import type { ChartZoomOptions } from '@neural-charts/web';
export type Signature =
| Readonly<{
axes: 'x' | 'y' | 'xy';
value?: PlanViewportValue;
controls?: boolean;
zoom?: Readonly<ChartZoomOptions>;
pan?: boolean;
pinch?: boolean;
wheel?: false | 'ctrl' | 'always';
}>
| undefined;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": "Secondary-axis reference band",
"description": "Mark a comfortable temperature range on the secondary axis.",
"height": 380,
"appearance": {
"colors": [
"#2C6DCD",
"#638A35"
],
"markers": true,
"lineWidth": 2,
"markerRadius": 6,
"dataLabels": false
},
"legend": {
"visible": true,
"position": "bottom"
},
"tooltip": {
"enabled": true,
"content": "point",
"placement": "auto",
"crosshair": false
},
"axes": {
"grid": true,
"x": {
"visible": true,
"title": "Day"
},
"y": {
"visible": true,
"title": "Rainfall (mm)"
},
"secondaryY": {
"visible": true,
"title": "Temperature (°C)"
}
},
"referenceBands": [
{
"id": "comfort",
"from": 20,
"to": 30,
"axis": "y",
"valueAxis": "secondary"
}
],
"referenceBandStyles": [
{
"id": "comfort",
"label": "Comfort",
"color": "#E39A31",
"opacity": 0.16
}
]
} 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.