Declares the charts in the composition. Each panel has its own ID and chart data.
Linked numeric window
The two charts use the same original numeric X domain and independent Y windows.
Live demo
Configuration
With automatic layout, panels share a row when space allows. Use one column to compare them vertically.
Automatic
Example code
Copy the example with its current settings.
Angular · TypeScript
import { ChartToolbarAction, ChartToolbarPosition } from '@neural-charts/angular';
import { Component } from '@angular/core';
import { NeuralChartPanels, type ChartPanelsData, type ChartPanelsOptions } from '@neural-charts/angular';
@Component({
selector: 'app-rollout-panels',
imports: [NeuralChartPanels],
template: '<nc-chart-panels [data]="data" [options]="options" instanceId="rollout" />'
})
export class RolloutPanels {
readonly data: ChartPanelsData = {
"panels": [
{
"id": "overview",
"data": {
"type": "line",
"axes": {
"x": {
"type": "linear",
"domain": [
0,
70
],
"nice": false
},
"y": {
"type": "linear",
"domain": [
0,
100
],
"nice": false
}
},
"series": [
{
"id": "sessions",
"name": "Sessions",
"data": [
{
"id": "p0",
"x": 0,
"y": 20
},
{
"id": "p1",
"x": 10,
"y": 45
},
{
"id": "p2",
"x": 20,
"y": 30
},
{
"id": "p3",
"x": 30,
"y": 65
},
{
"id": "p4",
"x": 40,
"y": 42
},
{
"id": "p5",
"x": 50,
"y": 75
},
{
"id": "p6",
"x": 60,
"y": 60
},
{
"id": "p7",
"x": 70,
"y": 80
}
]
}
]
}
},
{
"id": "detail",
"data": {
"type": "line",
"axes": {
"x": {
"type": "linear",
"domain": [
0,
70
],
"nice": false
},
"y": {
"type": "linear",
"domain": [
0,
100
],
"nice": false
}
},
"series": [
{
"id": "sessions",
"name": "Sessions",
"data": [
{
"id": "p0",
"x": 0,
"y": 20
},
{
"id": "p1",
"x": 10,
"y": 45
},
{
"id": "p2",
"x": 20,
"y": 30
},
{
"id": "p3",
"x": 30,
"y": 65
},
{
"id": "p4",
"x": 40,
"y": 42
},
{
"id": "p5",
"x": 50,
"y": 75
},
{
"id": "p6",
"x": 60,
"y": 60
},
{
"id": "p7",
"x": 70,
"y": 80
}
]
}
]
}
}
],
"viewportLinks": [
{
"id": "original-x",
"axis": "x",
"panelIds": [
"overview",
"detail"
]
}
]
};
readonly options: ChartPanelsOptions = {
chart: {
"animation": {
"enabled": true
},
"locale": "en",
"theme": "light",
toolbar: {
actions: [ChartToolbarAction.Csv, ChartToolbarAction.Png, ChartToolbarAction.Svg],
position: ChartToolbarPosition.Top,
}
},
"columns": "auto",
"panels": {
"overview": {
"title": "Full Y range",
"height": 220,
"unit": "sessions",
"legend": {
"visible": true,
"position": "bottom",
"interactive": true
},
"viewport": {
"axes": "xy",
"controls": true
},
"appearance": {
"colors": [
"#2C6DCD"
],
"markers": true
}
},
"detail": {
"title": "Independent Y detail",
"height": 220,
"unit": "sessions",
"legend": {
"visible": true,
"position": "bottom",
"interactive": true
},
"viewport": {
"axes": "xy",
"controls": true,
"value": {
"y": [
20,
80
]
}
},
"appearance": {
"colors": [
"#2C6DCD"
],
"markers": true
}
}
}
};
}Data, options and events
Identify each panel and link X axes that share a domain. Apply common options and override them per panel.