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: 'pictorial',
} satisfies Pick<ChartData, 'type'>;Non-negative values fill a shared, meaningful silhouette.
@neural-charts/webpictorialContainer width
The chart fits its available space automatically. Choose a width to simulate a different container.
The fill represents height, not area.
| Series | Category X | id | x | y | Visible |
|---|---|---|---|---|---|
| Observed | North | observed-north | north | 60 | Yes |
| Observed | South | observed-south | south | 35 | Yes |
| Available | North | available-north | north | 30 | Yes |
| Available | South | available-south | south | 50 | 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 recognizable shape to communicate capacity or a small number of proportions. Filled height represents the value; filled area and physical volume do not. Use columns when precise cross-category comparison matters more than the silhouette.
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 pictorial.
Identifies the calculation family. Keep the literal value when constructing the data object.
import type { ChartData } from '@neural-charts/web';
export const dataHeader = {
type: 'pictorial',
} 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": "north",
"label": "North"
},
{
"id": "south",
"label": "South"
}
]
},
"y": {
"type": "linear"
}
} satisfies (ChartData & { type: 'pictorial' })['axes'];export type Signature = {
readonly x: Omit<
Readonly<{
type: 'category';
values: readonly Readonly<{ id: string; label: string }>[];
}>,
'title' | 'labels' | 'grid'
> & {
readonly title?: never;
readonly grid?: never;
readonly labels?: never;
};
readonly y: Omit<
Readonly<{
type: 'linear';
domain?: readonly [0, number];
unit?: string;
}>,
'title' | 'labels' | 'grid'
> & {
readonly title?: never;
readonly grid?: never;
readonly labels?: never;
};
};Contains series and observations. Keep IDs when replacing data so selection and legend retain their identity.
import type { PlanPictorialSeries } from '@neural-charts/core';
export type Signature = readonly (Omit<
PlanPictorialSeries,
'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"
}
]
}
};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
}
};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"
}
};Selects the Pictorial silhouette through its shape configuration.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "bottle"
},
"gap": 8,
"background": true
}
};Sets the visual spacing between Pictorial silhouettes.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "bottle"
},
"gap": 8,
"background": true
}
};Shows or hides the reference silhouette behind the Pictorial mark.
import type { ChartOptions } from '@neural-charts/web';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "bottle"
},
"gap": 8,
"background": true
}
};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"
}
}
}
};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.
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": "A shaped fill",
"description": "The fill represents height, not area.",
"height": 380,
"layout": {
"shape": {
"type": "preset",
"name": "heart"
},
"gap": 8,
"background": true
},
"appearance": {
"colors": [
"#2C6DCD",
"#638A35"
],
"markers": false,
"dataLabels": false,
"lineWidth": 2,
"markerRadius": 6
},
"legend": {
"visible": true,
"position": "bottom"
},
"tooltip": {
"enabled": true,
"content": "point",
"placement": "auto",
"crosshair": false
},
"axes": {
"grid": false,
"x": {
"visible": true,
"title": "Team"
},
"y": {
"visible": false,
"title": ""
}
}
} 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.