API reference
Public entrypoints for the current integrations.
Angular #
Use NeuralChart as nc-chart. Inputs: data, options, instanceId, planningPorts and synchronization. Outputs: pointActivate, selectionChange, hiddenSeriesChange, viewportChange and diagnostic. Outputs contain domain information rather than DOM Events.
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-weekly-chart',
imports: [NeuralChart],
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<nc-chart [data]="data()" [options]="options()" instanceId="weekly-visits" (pointActivate)="lastPoint.set($event.id.pointId)" />'
})
export class WeeklyChart {
readonly data = signal<ChartData>({
"type": "line",
"axes": {
"x": {
"type": "linear"
},
"y": {
"type": "linear",
"includeZero": true
}
},
"series": [
{
"id": "visits",
"name": "Visits",
"data": [
{
"id": "mon",
"x": 1,
"y": 12
},
{
"id": "tue",
"x": 2,
"y": 18
},
{
"id": "wed",
"x": 3,
"y": 15
}
]
}
]
});
readonly options = signal<ChartOptions>({
"title": "Weekly activity",
"locale": "en",
"height": 360,
"tooltip": {
"enabled": true,
"crosshair": true
}
});
readonly lastPoint = signal<string | null>(null);
}Inputs
Typed data input. Replace the object when changing observations.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
}Presentation and interaction input. Bind a signal when the component applies option changes.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
}TypeScript signature
import type { InputSignal } from '@angular/core';
import type { ChartOptions } from '@neural-charts/angular';
export type Signature = InputSignal<
ChartOptions<
| 'lollipop'
| 'columnrange'
| 'columnpyramid'
| 'boxplot'
| 'errorbar'
| 'arearange'
| 'areasplinerange'
| 'spline'
| 'networkgraph'
| 'abands'
| 'ad'
| 'ao'
| 'apo'
| 'aroon'
| 'aroonoscillator'
| 'atr'
| 'bb'
| 'candlestick'
| 'cci'
| 'chaikin'
| 'cmf'
| 'cmo'
| 'dema'
| 'disparityindex'
| 'dmi'
| 'dpo'
| 'ema'
| 'flags'
| 'heikinashi'
| 'hlc'
| 'hollowcandlestick'
| 'ikh'
| 'keltnerchannels'
| 'klinger'
| 'linearregression'
| 'linearregressionangle'
| 'linearregressionintercept'
| 'linearregressionslope'
| 'macd'
| 'mfi'
| 'momentum'
| 'natr'
| 'obv'
| 'ohlc'
| 'pc'
| 'pivotpoints'
| 'pointandfigure'
| 'ppo'
| 'priceenvelopes'
| 'psar'
| 'renko'
| 'roc'
| 'rsi'
| 'slowstochastic'
| 'sma'
| 'stochastic'
| 'supertrend'
| 'tema'
| 'trendline'
| 'trix'
| 'vbp'
| 'vwap'
| 'williamsr'
| 'wma'
| 'zigzag'
| 'line'
| 'scatter'
| 'regression'
| 'fan'
| 'violin'
| 'flame'
| 'dendrogram'
| 'parallel'
| 'windrose'
| 'radialbar'
| 'heatmap'
| 'venn'
| 'contour'
| 'tilemap'
| 'pictorial'
| 'wordcloud'
| 'dependencywheel'
| 'chord'
| 'arcdiagram'
| 'bullet'
| 'variwide'
| 'xrange'
| 'timeline'
| 'sankey'
| 'vector'
| 'windbarb'
| 'packedbubble'
| 'sunburst'
| 'treegraph'
| 'organization'
| 'variablepie'
| 'item'
| 'polygon'
| 'dumbbell'
| 'area'
| 'streamgraph'
| 'histogram'
| 'bellcurve'
| 'areaspline'
| 'funnel'
| 'pyramid'
| 'pareto'
| 'radar'
| 'polar'
| 'column'
| 'waterfall'
| 'treemap'
| 'mixed'
| 'pie'
| 'donut'
| 'gauge'
| 'bubble'
>
>;Unique chart ID. Use the same ID on server and client to keep SVG identity stable.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
}Supplies environment-specific planning capabilities such as word cloud text metrics.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
[planningPorts]="ports()"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
readonly ports = input.required<NonNullable<ReturnType<NeuralChart['planningPorts']>>>();
}Supplies typed text or browser content for the title, legend, tooltip and labels.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions, ChartContentSlotName, type ChartContentPorts } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
[content]="content"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
readonly content: ChartContentPorts = {
[ChartContentSlotName.Title]: { text: context => context.defaultText.toUpperCase() },
};
}Connects the chart to a shared channel. Keep data identities stable when synchronizing.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions, type ChartMountOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
[synchronization]="sync()"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
readonly sync = input.required<NonNullable<ChartMountOptions['synchronization']>>();
}Events
Emits the activated observation and its identity from pointer or keyboard interaction.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
(pointActivate)="handle($event)"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
handle(event: Parameters<NeuralChart['pointActivate']['emit']>[0]) {
console.info(event.id, event.observation.value);
}
}TypeScript signature
import type { OutputEmitterRef } from '@angular/core';
import type { ChartPointId } from '@neural-charts/angular';
import type { PlanObservation } from '@neural-charts/web';
export type Signature = OutputEmitterRef<
Readonly<{
id: ChartPointId;
observation: PlanObservation;
source: 'pointer' | 'keyboard';
revision: number;
}>
>;Emits hidden series IDs. In controlled mode, update options.hiddenSeriesIds to apply the change.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
(hiddenSeriesChange)="handle($event)"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
handle(ids: Parameters<NeuralChart['hiddenSeriesChange']['emit']>[0]) {
console.info(ids);
}
}Proposes a selection. When the app controls selection, apply the IDs through options.selectedPoints.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
(selectionChange)="handle($event)"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
handle(points: Parameters<NeuralChart['selectionChange']['emit']>[0]) {
console.info(points);
}
}TypeScript signature
import type { OutputEmitterRef } from '@angular/core';
export type Signature = OutputEmitterRef<
readonly Readonly<{ seriesId: string; pointId: string }>[]
>;Emits the visible window proposed by zoom or pan.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
(viewportChange)="handle($event)"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
handle(window: Parameters<NeuralChart['viewportChange']['emit']>[0]) {
console.info(window);
}
}TypeScript signature
import type { NeuralChart } from '@neural-charts/angular';
export type Signature = NeuralChart['viewportChange'];Reports a diagnostic when an input cannot be applied.
Usage example
import { Component, input } from '@angular/core';
import { NeuralChart, type ChartData, type ChartOptions } from '@neural-charts/angular';
@Component({
selector: 'app-visits-chart',
imports: [NeuralChart],
template: `
<nc-chart
instanceId="weekly-visits"
[data]="data()"
[options]="options"
(diagnostic)="handle($event)"
/>
`,
})
export class VisitsChart {
readonly data = input.required<ChartData>();
readonly options: ChartOptions = { title: 'Weekly visits', height: 380 };
handle(diagnostic: Parameters<NeuralChart['diagnostic']['emit']>[0]) {
console.warn(diagnostic.path, diagnostic.message);
}
}TypeScript signature
import type { OutputEmitterRef } from '@angular/core';
export type Signature = OutputEmitterRef<
Readonly<{ code: string; reason: string; path: string; message: string }>
>;Export methods
Returns the applied chart as SVG. Full composition includes the visible title and legend.
Usage example
import type { NeuralChart } from '@neural-charts/angular';
export function exportSvg(chart: NeuralChart) {
return chart.exportSvg({ composition: 'chart' });
}Exports original observations as CSV. Options configure content and format.
Usage example
import type { NeuralChart } from '@neural-charts/angular';
export function exportCsv(chart: NeuralChart) {
return chart.exportCsv({ delimiter: ';', bom: true });
}Generates a PNG Blob in the browser. Set the density through pixelRatio.
Usage example
import type { NeuralChart } from '@neural-charts/angular';
export function exportPng(chart: NeuralChart) {
return chart.exportPng({ composition: 'chart', pixelRatio: 2 });
}Specialized options #
Each variant’s data/options panels expose real models compiled against the installed packages. Incompatible options return diagnostics instead of pretending to have an effect.
| Option | When omitted | When to change it |
|---|---|---|
| tooltip.enabled | Enabled | Disable it if your application provides its own detail panel. |
| legend.visible / legend.position | Visible, below the chart | A side position needs 600 px of width. Narrower containers place the legend below. |
| animation.enabled | Disabled | Enable it to animate entry or changes. The system motion preference can suppress it. |
| options.locale / formatting.locale | English messages; formatting inherits the chart language. | Set both when the interface language and regional format differ. |
Presentation and size
Heads the chart and contributes to its accessible name. Full-chart export includes the visible title.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"title": "Weekly visits"
};Adds context below the title, such as the period or data source. Use accessibility.description for a screen-reader-specific description.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"description": "Daily visits to the product site"
};Selects the light or dark theme. Use themeTokens to customize its colors.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"theme": "dark"
};Customizes background, text, grid, and focus colors. Check contrast when changing the theme palette.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"theme": "dark",
"themeTokens": {
"background": "#152333",
"foreground": "#F3F7FC",
"focus": "#93C6FF"
}
};Supplies a width in pixels for layout. In a responsive view, the renderer can measure its container and use the available space.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"width": 768
};Sets the chart height in pixels. Responsive rules can apply a different height based on the container width.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"height": 380
};Applies rules by container width. When several match, the last applicable value wins.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"responsive": [
{
"maxWidth": 480,
"options": {
"height": 300,
"legend": {
"position": "bottom"
},
"tooltip": {
"placement": "docked"
}
}
}
]
};Groups colors, marks, strokes, and labels. Series and point styles use stable identifiers.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"appearance": {
"colors": [
"#2559CC",
"#B52E70"
],
"markers": true,
"markerRadius": 4
}
};TypeScript signature
import type {
ChartLabelLayout,
ChartPointStyle,
ChartSeriesStyle,
ChartTextStyle,
ChartWaterfallStyle,
} from '@neural-charts/web';
export type Signature =
| Readonly<{
colors?: readonly string[];
series?: readonly ChartSeriesStyle[];
points?: readonly ChartPointStyle[];
bandColors?: readonly string[];
risingColor?: string;
fallingColor?: string;
lineWidth?: number;
markers?: boolean;
markerRadius?: number;
dataLabels?: boolean;
stackLabels?: boolean;
centerName?: string;
labelLimit?: number;
dataLabelLayout?: ChartLabelLayout;
titleStyle?: ChartTextStyle;
descriptionStyle?: ChartTextStyle;
minPlotWidth?: number;
waterfall?: ChartWaterfallStyle | undefined;
}>
| undefined;Maps values to colors in supported heatmaps and tilemaps. Set a shared domain to compare views on the same color scale.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'heatmap'> = {
"colorAxis": {
"type": "continuous",
"domain": [
-8,
16
],
"stops": [
{
"at": 0,
"color": "#2C6DCD"
},
{
"at": 0.3333333333333333,
"color": "#F1F4F9"
},
{
"at": 1,
"color": "#8F59CA"
}
],
"missingColor": "#CBD5E1"
}
};Configures legend position and whether it can change series visibility.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"legend": {
"position": "bottom",
"interactive": true
}
};TypeScript signature
export type Signature =
| Readonly<{
visible?: boolean;
position?: 'top' | 'bottom' | 'left' | 'right';
interactive?: boolean;
reverse?: boolean;
maxLabelCharacters?: number;
itemSpacing?: number;
}>
| undefined;Axes, scales and geometry
Selects a logarithmic X or Y scale where supported. Use positive values; original observations keep their units.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'line'> = {
"scales": {
"y": {
"type": "log"
}
}
};Changes the orientation of a supported hierarchy, for example to read an organization chart from left to right.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'organization'> = {
"hierarchy": {
"orientation": "horizontal"
}
};Marks an interval on an axis, such as an acceptable temperature range. Set its bounds in that axis’s units.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"referenceBands": [
{
"id": "range",
"axis": "y",
"from": 40,
"to": 60
}
]
};Styles an existing band’s color, opacity, or label. Match its ID to the one declared in referenceBands.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"referenceBands": [
{
"id": "range",
"axis": "y",
"from": 40,
"to": 60
}
],
"referenceBandStyles": [
{
"id": "range",
"label": "Expected range",
"color": "#167D6D",
"opacity": 0.15
}
]
};Labels a reference line by ID, for example “Target.” Set the line value in references.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"references": [
{
"id": "target",
"axis": "y",
"value": 50
}
],
"referenceLabels": [
{
"id": "target",
"text": "Weekly target"
}
]
};Changes a reference line’s color, width, or dash pattern using its ID.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"references": [
{
"id": "target",
"axis": "y",
"value": 50
}
],
"referenceStyles": [
{
"id": "target",
"dash": "dashed",
"color": "#167D6D",
"width": 2
}
]
};Attaches a comment to an observation by series and point ID. dx and dy offset the text relative to the mark.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"annotations": [
{
"id": "release",
"point": {
"seriesId": "visits",
"pointId": "day-0"
},
"text": "Product release",
"dy": -12
}
]
};TypeScript signature
import type { ChartPointId } from '@neural-charts/web';
export type Signature =
| readonly Readonly<{
id: string;
point: ChartPointId;
text: string;
dx?: number;
dy?: number;
}>[]
| undefined;Adjusts geometry specific to a family, such as column orientation or a donut’s hole. Check the options for your chart family.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'column'> = {
"layout": {
"orientation": "horizontal",
"groupGap": 0.25
}
};Configures the grid, titles, and tick labels. data.axes defines how values are interpreted.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"axes": {
"grid": true,
"x": {
"title": "Day"
},
"y": {
"title": "Visits"
}
}
};TypeScript signature
import type { ChartAxisOptions } from '@neural-charts/web';
export type Signature =
| Readonly<{
grid?: boolean;
x?: ChartAxisOptions;
y?: ChartAxisOptions;
secondaryY?: ChartAxisOptions;
}>
| undefined;Draws reference lines at specific axis values, such as a target. Use the same ID in referenceLabels and referenceStyles to customize them.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"references": [
{
"id": "target",
"axis": "y",
"value": 50
}
]
};Interaction and animation
Groups transition enablement, duration, and revision. The renderer respects the reduced-motion preference.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"animation": {
"enabled": true,
"duration": 250
}
};TypeScript signature
export type Signature =
| Readonly<{ enabled?: boolean; duration?: number; revision?: number }>
| undefined;Configures the details shown when exploring a mark, including placement, shared mode, and crosshair.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"tooltip": {
"enabled": true,
"content": "shared",
"crosshair": true
}
};TypeScript signature
export type Signature =
| Readonly<{
enabled?: boolean;
content?: 'point' | 'shared';
placement?: 'auto' | 'docked';
crosshair?: boolean;
pinnable?: boolean;
background?: string;
foreground?: string;
}>
| undefined;Applies a domain window and configures zoom controls on supported charts.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"viewport": {
"axes": "x",
"controls": true,
"pan": true,
"wheel": "ctrl"
}
};TypeScript signature
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.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"hiddenSeriesIds": [
"previous"
]
};Applies selection by series and observation identity.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"selectedPoints": [
{
"seriesId": "visits",
"pointId": "day-0"
}
]
};TypeScript signature
export type Signature =
readonly Readonly<{ seriesId: string; pointId: string }>[] | undefined;Chart toolbar
Shows direct-download buttons for the selected formats in list order. Include each format once.
Default value Hidden
Places the toolbar outside the plot. Use ChartDownloadMenuPosition.Top for above the chart or ChartDownloadMenuPosition.Bottom for below it.
Default value ChartDownloadMenuPosition.Bottom
Combines download, zoom and reset buttons in actions order. Use ChartToolbarPosition to place it. Zoom requires viewport.
TypeScript signature
import type {
ChartDownloadMenuPosition,
ChartToolbarAction,
} from '@neural-charts/web';
export type Signature =
| Readonly<{
actions: readonly ChartToolbarAction[];
position?: ChartDownloadMenuPosition;
}>
| undefined;Language, accessibility and limits
Configures the point and category limits checked by the planner. Use it to bound what a view accepts.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"capacity": {
"points": 5000,
"categories": 200
}
};Identifies the unit represented by values, such as °C. Use formatting for number or currency formatting.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"unit": "°C"
};Sets the language of chart messages and controls.
Default value en
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"locale": "es"
};Configures the accessible description, keyboard navigation, and additional text for series or points identified by ID.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"accessibility": {
"description": "Daily traffic for the current and previous week",
"seriesDescriptions": [
{
"id": "visits",
"description": "Visits this week"
}
]
}
};Formats numbers and dates for the chosen locale. Selecting a currency changes the presentation and preserves the underlying amount.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions = {
"formatting": {
"locale": "es-ES",
"number": {
"style": "currency",
"currency": "EUR"
}
}
};TypeScript signature
import type {
ChartDateFormat,
ChartNumberFormat,
} from '@neural-charts/web';
export type Signature =
| Readonly<{
locale?: string;
number?: ChartNumberFormat;
date?: ChartDateFormat;
}>
| undefined;Sets the space between category groups in supported grouped charts.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'column'> = {
"layout": {
"groupGap": 0.25,
"barGap": 0.15,
"maxBarWidth": 42
}
};Sets the spacing between neighboring series marks inside the same group.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'column'> = {
"layout": {
"groupGap": 0.25,
"barGap": 0.15,
"maxBarWidth": 42
}
};Caps bar thickness in pixels to keep charts with few categories proportionate.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'column'> = {
"layout": {
"groupGap": 0.25,
"barGap": 0.15,
"maxBarWidth": 42
}
};Switches between horizontal and vertical layout in supported families. Data and IDs stay the same.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'dendrogram'> = {
"layout": {
"orientation": "vertical"
}
};Controls the donut’s center opening relative to its outer radius.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'donut'> = {
"layout": {
"holeRatio": 0.62,
"startAngle": -90,
"endAngle": 90
}
};Selects the gauge’s base shape. arc uses an open sweep and ring uses a ring.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'gauge'> = {
"layout": {
"preset": "arc",
"startAngle": -90,
"endAngle": 90,
"style": "needle",
"tickCount": 7
}
};Adjusts the radius of the geometric mark in families such as Timeline, Lollipop, or Dumbbell.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'timeline'> = {
"layout": {
"labelPosition": "alternate",
"labelMaxWidth": 120,
"markerRadius": 4
}
};Adjusts the visual width of whiskers in supported distributions.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'boxplot'> = {
"layout": {
"whiskerWidth": 0.5
}
};Adjusts the width of the cap at the ends of an error interval or whisker.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'errorbar'> = {
"layout": {
"capWidth": 1
}
};Configures a financial indicator’s calculation, such as its period. Each indicator accepts its own parameters.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'abands'> = {
"layout": {
"parameters": {
"period": 8
}
}
};Controls smoothing for a violin’s density estimate. A larger value smooths the shape more.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'violin'> = {
"layout": {
"bandwidth": 4,
"resolution": 64,
"normalization": "width",
"gapRatio": 0.25
}
};Sets how many positions sample the violin density.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'violin'> = {
"layout": {
"resolution": 64,
"normalization": "count",
"gapRatio": 0.25
}
};Chooses what controls violin width: area, maximum width, or sample count.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'violin'> = {
"layout": {
"resolution": 64,
"normalization": "count",
"gapRatio": 0.25
}
};Controls proportional spacing between neighboring marks, such as heatmap cells.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'violin'> = {
"layout": {
"resolution": 64,
"normalization": "count",
"gapRatio": 0.25
}
};Leaves space between rows so interval bars stay separated.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'flame'> = {
"layout": {
"rowPadding": 0.16
}
};Chooses Cartesian parallel axes or their polar arrangement for that family.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'parallel'> = {
"layout": {
"coordinates": "polar"
}
};Sets stacking for supported families. sum accumulates values; percent displays proportion on a 0–100 scale.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "person"
},
"gap": 8,
"background": true,
"stacking": "sum"
}
};Reserves an empty inner area in a radial bar chart as a proportion of its radius.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'radialbar'> = {
"layout": {
"gapRatio": 0.12,
"innerRadiusRatio": 0.2
}
};Adjusts tile opacity. Lower values reveal more of the background.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'tilemap'> = {
"layout": {
"tileShape": "circle",
"pointPadding": 1,
"opacity": 1
}
};Leaves room in layouts such as Venn or word cloud.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'venn'> = {
"layout": {
"padding": 12
}
};Sets the minimum font size attempted for words in a cloud.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'wordcloud'> = {
"layout": {
"minFontSize": 12,
"maxFontSize": 42,
"padding": 3,
"rotations": [
0,
90
],
"seed": 7,
"maxWords": 64
}
};Sets the maximum size for the most heavily weighted word in a cloud.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'wordcloud'> = {
"layout": {
"minFontSize": 12,
"maxFontSize": 42,
"padding": 3,
"rotations": [
0,
90
],
"seed": 7,
"maxWords": 64
}
};Limits the text orientations the algorithm may try when placing words.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'wordcloud'> = {
"layout": {
"minFontSize": 12,
"maxFontSize": 42,
"padding": 3,
"rotations": [
0,
90
],
"seed": 7,
"maxWords": 64
}
};Seeds word placement to reproduce the arrangement with the same inputs and font metrics.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'wordcloud'> = {
"layout": {
"minFontSize": 12,
"maxFontSize": 42,
"padding": 3,
"rotations": [
0,
90
],
"seed": 7,
"maxWords": 64
}
};Limits how many words are considered for placement. Use it to maintain readability in small spaces.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'wordcloud'> = {
"layout": {
"minFontSize": 12,
"maxFontSize": 42,
"padding": 3,
"rotations": [
0,
90
],
"seed": 7,
"maxWords": 64
}
};Sets the starting angle in degrees for a supported circular chart.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'dependencywheel'> = {
"layout": {
"startAngle": 0,
"nodePadding": 2,
"nodeWidth": 14
}
};Sets spacing between nodes in flow and dependency diagrams.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'dependencywheel'> = {
"layout": {
"startAngle": 0,
"nodePadding": 2,
"nodeWidth": 14
}
};Adjusts node width or band thickness, depending on the diagram.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'dependencywheel'> = {
"layout": {
"startAngle": 0,
"nodePadding": 2,
"nodeWidth": 14
}
};Reverses the visual layout in supported families such as Funnel or Arc diagram.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Adjusts circular node size in an arc diagram.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Controls the visual width of links in an arc diagram.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'arcdiagram'> = {
"layout": {
"reversed": false,
"nodeRadius": 6,
"linkWidth": 12
}
};Adjusts the space around each mark in supported families such as Tilemap, Bullet, or Variwide.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'tilemap'> = {
"layout": {
"tileShape": "circle",
"pointPadding": 1,
"opacity": 1
}
};Controls whether intervals in the same category are grouped by series or overlap.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'xrange'> = {
"layout": {
"grouping": "grouped",
"rowPadding": 0.2
}
};Places timeline labels above, below, or alternating around the axis.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'timeline'> = {
"layout": {
"labelPosition": "alternate",
"labelMaxWidth": 120,
"markerRadius": 4
}
};Limits the width reserved for a timeline label, useful with long text.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'timeline'> = {
"layout": {
"labelPosition": "alternate",
"labelMaxWidth": 120,
"markerRadius": 4
}
};Separates series into groups in a packed-bubble chart.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'packedbubble'> = {
"layout": {
"splitSeries": true
}
};Sets a minimum radius for variable-radius slices so smaller magnitudes stay visible.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'variablepie'> = {
"layout": {
"minRadiusRatio": 0.25,
"radiusScale": "radius"
}
};Defines how magnitude maps to the radius or area of a radial mark in supported families.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'variablepie'> = {
"layout": {
"minRadiusRatio": 0.25,
"radiusScale": "radius"
}
};Sets the number of columns in an item chart’s mark grid.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'item'> = {
"layout": {
"columns": 4
}
};Sets the number of bins used to group histogram samples.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'histogram'> = {
"layout": {
"binCount": 10
}
};Controls the sampling resolution of the distribution curve.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'bellcurve'> = {
"layout": {
"intervals": 128,
"standardDeviations": 4.5
}
};Sets the curve’s span on either side of the mean in standard deviations.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'bellcurve'> = {
"layout": {
"intervals": 128,
"standardDeviations": 4.5
}
};Sets the funnel neck width as a proportion of the shape’s width.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'funnel'> = {
"layout": {
"neckWidth": 0.3,
"neckHeight": 0.25,
"reversed": false
}
};Sets how much of the funnel height the neck occupies.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'funnel'> = {
"layout": {
"neckWidth": 0.3,
"neckHeight": 0.25,
"reversed": false
}
};Selects the shape of tilemap marks.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'tilemap'> = {
"layout": {
"tileShape": "circle",
"pointPadding": 1,
"opacity": 1
}
};Sets the ending angle in degrees. Pair it with startAngle for a partial sweep.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'pie'> = {
"layout": {
"startAngle": -90,
"endAngle": 90
}
};Adjusts the number of reference ticks on a gauge.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'gauge'> = {
"layout": {
"preset": "arc",
"startAngle": -90,
"endAngle": 90,
"style": "needle",
"tickCount": 7
}
};Chooses how Gauge displays its reading: solid fill or needle.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'gauge'> = {
"layout": {
"preset": "arc",
"startAngle": -90,
"endAngle": 90,
"style": "needle",
"tickCount": 7
}
};Assigns series IDs to separate stacks for comparison within a category. Set stacking as well.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'column'> = {
"layout": {
"orientation": "vertical",
"stacking": "sum",
"stackGroups": [
{
"id": "actual",
"label": "Actual",
"seriesIds": [
"actual-a",
"actual-b"
]
},
{
"id": "planned",
"label": "Previsto",
"seriesIds": [
"planned-a",
"planned-b"
]
}
]
}
};Defines qualitative ranges behind a Bullet reading, such as “low,” “acceptable,” and “target.”
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'bullet'> = {
"layout": {
"orientation": "vertical",
"bands": [
{
"id": "below",
"from": 0,
"to": 50,
"label": "Requiere atención"
},
{
"id": "progress",
"from": 50,
"to": 80,
"label": "En progreso"
},
{
"id": "goal",
"from": 80,
"to": 100,
"label": "En objetivo"
}
],
"pointPadding": 0.25
}
};Selects the Pictorial silhouette through its shape configuration.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "bottle"
},
"gap": 8,
"background": true
}
};Sets the visual spacing between Pictorial silhouettes.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
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.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'pictorial'> = {
"layout": {
"shape": {
"type": "preset",
"name": "bottle"
},
"gap": 8,
"background": true
}
};Sets the thresholds for lines of equal value in Contour. Each level can have a name and color.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'contour'> = {
"layout": {
"levels": [
{
"id": "cool",
"value": 14,
"name": "14°C",
"color": "#2E73CF"
},
{
"id": "mild",
"value": 18,
"name": "18°C",
"color": "#638A35"
},
{
"id": "warm",
"value": 22,
"name": "22°C",
"color": "#A46BE0"
},
{
"id": "hot",
"value": 26,
"name": "26°C",
"color": "#D68D21"
}
],
"segmentBudget": 4096
}
};Caps how many segments Contour may generate. Use it to bound output complexity.
Usage example
import type { ChartOptions } from '@neural-charts/angular';
export const options: ChartOptions<'contour'> = {
"layout": {
"levels": [
{
"id": "cool",
"value": 14,
"name": "14°C",
"color": "#2E73CF"
},
{
"id": "mild",
"value": 18,
"name": "18°C",
"color": "#638A35"
},
{
"id": "warm",
"value": 22,
"name": "22°C",
"color": "#A46BE0"
},
{
"id": "hot",
"value": 26,
"name": "26°C",
"color": "#D68D21"
}
],
"segmentBudget": 4096
}
};Templates and content #
Project templates for the title, tooltip, legend and labels. Use [content] to define portable text retained on the server and on export.
See all five customization examples →
ChartContentSlotName
Import this enum to choose the part of the chart you customize. Each member retains the key used in content and selects its typed context.
import { ChartContentSlotName } from "@neural-charts/angular";TitletitleLegendlegendTooltiptooltipAxisLabelaxisLabelDataLabeldataLabel
Customizes the title. Return portable text for the name and exports, and add browser presentation where needed.
Usage example
import { Component, input } from '@angular/core';
import {
NeuralChart, ChartContentSlotName, NeuralChartTitleTemplate,
type ChartContentPorts, type ChartData, type ChartOptions,
} from '@neural-charts/angular';
@Component({
selector: 'app-custom-title',
imports: [NeuralChart, NeuralChartTitleTemplate],
template: `
<nc-chart [data]="data()" [options]="options()" [content]="content"
instanceId="chart-title">
<ng-template ncChartTitle let-value>
<strong>{{ value.text }}</strong>
</ng-template>
</nc-chart>
`,
})
export class CustomChart {
readonly data = input.required<ChartData>();
readonly options = input<ChartOptions>({});
readonly content: ChartContentPorts = {
[ChartContentSlotName.Title]: { text: context => context.defaultText },
};
}Changes legend entry text using its ID, name, and visibility. The library still handles its interaction.
Usage example
import { Component, input } from '@angular/core';
import {
NeuralChart, ChartContentSlotName, NeuralChartLegendTemplate,
type ChartContentPorts, type ChartData, type ChartOptions,
} from '@neural-charts/angular';
@Component({
selector: 'app-custom-legend',
imports: [NeuralChart, NeuralChartLegendTemplate],
template: `
<nc-chart [data]="data()" [options]="options()" [content]="content"
instanceId="chart-legend">
<ng-template ncChartLegend let-value>
<strong>{{ value.text }}</strong>
</ng-template>
</nc-chart>
`,
})
export class CustomChart {
readonly data = input.required<ChartData>();
readonly options = input<ChartOptions>({});
readonly content: ChartContentPorts = {
[ChartContentSlotName.Legend]: { text: context => context.name },
};
}Customizes details for the active observation. In shared mode, you can use points or rows for the compared series.
Usage example
import { Component, input } from '@angular/core';
import {
NeuralChart, ChartContentSlotName, NeuralChartTooltipTemplate,
type ChartContentPorts, type ChartData, type ChartOptions,
} from '@neural-charts/angular';
@Component({
selector: 'app-custom-tooltip',
imports: [NeuralChart, NeuralChartTooltipTemplate],
template: `
<nc-chart [data]="data()" [options]="options()" [content]="content"
instanceId="chart-tooltip">
<ng-template ncChartTooltip let-value>
<strong>{{ value.text }}</strong>
</ng-template>
</nc-chart>
`,
})
export class CustomChart {
readonly data = input.required<ChartData>();
readonly options = input<ChartOptions>({});
readonly content: ChartContentPorts = {
[ChartContentSlotName.Tooltip]: { text: context => context.observation.seriesName + ' · ' + context.observation.label + ': ' + context.observation.value },
};
}Customizes axis tick text. The context distinguishes X, Y, and the secondary axis.
Usage example
import { Component, input } from '@angular/core';
import {
NeuralChart, ChartContentSlotName, NeuralChartAxisLabelTemplate,
type ChartContentPorts, type ChartData, type ChartOptions,
} from '@neural-charts/angular';
@Component({
selector: 'app-custom-axis-labels',
imports: [NeuralChart, NeuralChartAxisLabelTemplate],
template: `
<nc-chart [data]="data()" [options]="options()" [content]="content"
instanceId="chart-axis-labels">
<ng-template ncChartAxisLabel let-value>
<svg:tspan font-weight="600">{{ value.text }}</svg:tspan>
</ng-template>
</nc-chart>
`,
})
export class CustomChart {
readonly data = input.required<ChartData>();
readonly options = input<ChartOptions>({});
readonly content: ChartContentPorts = {
[ChartContentSlotName.AxisLabel]: { text: context => context.defaultText },
};
}Customizes text next to a mark or annotation. Enable appearance.dataLabels where the chart family requires it.
Usage example
import { Component, input } from '@angular/core';
import {
NeuralChart, ChartContentSlotName, NeuralChartDataLabelTemplate,
type ChartContentPorts, type ChartData, type ChartOptions,
} from '@neural-charts/angular';
@Component({
selector: 'app-custom-data-labels',
imports: [NeuralChart, NeuralChartDataLabelTemplate],
template: `
<nc-chart [data]="data()" [options]="options()" [content]="content"
instanceId="chart-data-labels">
<ng-template ncChartDataLabel let-value>
<svg:tspan font-weight="600">{{ value.text }}</svg:tspan>
</ng-template>
</nc-chart>
`,
})
export class CustomChart {
readonly data = input.required<ChartData>();
readonly options = input<ChartOptions>({ appearance: { dataLabels: true } });
readonly content: ChartContentPorts = {
[ChartContentSlotName.DataLabel]: { text: context => context.defaultText },
};
}Receives a diagnostic if a customization callback fails, so you can locate the cause independently of chart logic.
Usage example
import type { ChartContentPorts } from '@neural-charts/angular';
export const content: ChartContentPorts = {
onError(diagnostic) {
console.warn(diagnostic.path, diagnostic.message);
},
};