Line

Linked time window

Both charts use the same UTC timestamps and keep their own vertical scales.

Live demo

Full Y range002525505075751001002026-11-012026-11-012026-11-032026-11-032026-11-052026-11-052026-11-072026-11-07Independent Y detail20204040606080802026-11-012026-11-012026-11-032026-11-032026-11-052026-11-052026-11-072026-11-07

Configuration

With automatic layout, panels share a row when space allows. Use one column to compare them vertically.

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": "time",
            "domain": [
              1793491200000,
              1794096000000
            ],
            "nice": false
          },
          "y": {
            "type": "linear",
            "domain": [
              0,
              100
            ],
            "nice": false
          }
        },
        "series": [
          {
            "id": "sessions",
            "name": "Sessions",
            "data": [
              {
                "id": "p0",
                "x": 1793491200000,
                "y": 20
              },
              {
                "id": "p1",
                "x": 1793577600000,
                "y": 45
              },
              {
                "id": "p2",
                "x": 1793664000000,
                "y": 30
              },
              {
                "id": "p3",
                "x": 1793750400000,
                "y": 65
              },
              {
                "id": "p4",
                "x": 1793836800000,
                "y": 42
              },
              {
                "id": "p5",
                "x": 1793923200000,
                "y": 75
              },
              {
                "id": "p6",
                "x": 1794009600000,
                "y": 60
              },
              {
                "id": "p7",
                "x": 1794096000000,
                "y": 80
              }
            ]
          }
        ]
      }
    },
    {
      "id": "detail",
      "data": {
        "type": "line",
        "axes": {
          "x": {
            "type": "time",
            "domain": [
              1793491200000,
              1794096000000
            ],
            "nice": false
          },
          "y": {
            "type": "linear",
            "domain": [
              0,
              100
            ],
            "nice": false
          }
        },
        "series": [
          {
            "id": "sessions",
            "name": "Sessions",
            "data": [
              {
                "id": "p0",
                "x": 1793491200000,
                "y": 20
              },
              {
                "id": "p1",
                "x": 1793577600000,
                "y": 45
              },
              {
                "id": "p2",
                "x": 1793664000000,
                "y": 30
              },
              {
                "id": "p3",
                "x": 1793750400000,
                "y": 65
              },
              {
                "id": "p4",
                "x": 1793836800000,
                "y": 42
              },
              {
                "id": "p5",
                "x": 1793923200000,
                "y": 75
              },
              {
                "id": "p6",
                "x": 1794009600000,
                "y": 60
              },
              {
                "id": "p7",
                "x": 1794096000000,
                "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.

ChartPanelsData

ChartPanelsOptions

AngularPanels