ID del nivel que se muestra al iniciar el gráfico.
Explorar y abrir detalle
Selecciona un dato y pulsa Ver detalle; Volver recupera la vista anterior.
Ejemplo de exploración
Configuración
Ajusta la altura de la gráfica en todos los niveles de detalle.
Código del ejemplo
Copia el ejemplo con la configuración aplicada.
Angular · TypeScript
import { ChartToolbarAction, ChartToolbarPosition } from '@neural-charts/angular';
import { Component } from '@angular/core';
import { NeuralChartDrilldown, type ChartDrilldownData, type ChartDrilldownOptions } from '@neural-charts/angular';
@Component({
selector: 'app-regional-orders',
imports: [NeuralChartDrilldown],
template: '<nc-chart-drilldown [data]="data" [options]="options" instanceId="regional-orders" />'
})
export class RegionalOrders {
readonly data: ChartDrilldownData = {
"rootId": "regions",
"nodes": [
{
"id": "regions",
"data": {
"type": "treegraph",
"nodes": [
{
"id": "north",
"label": "Norte"
},
{
"id": "south",
"label": "Sur"
}
],
"links": [
{
"id": "north-south",
"from": "north",
"to": "south"
}
]
}
},
{
"id": "north",
"data": {
"type": "column",
"axes": {
"x": {
"type": "category",
"values": [
{
"id": "a",
"label": "A"
},
{
"id": "b",
"label": "B"
},
{
"id": "c",
"label": "C"
}
]
},
"y": {
"type": "linear"
}
},
"series": [
{
"id": "orders",
"name": "Pedidos",
"data": [
{
"id": "a",
"x": "a",
"y": 0
},
{
"id": "b",
"x": "b",
"y": 10
},
{
"id": "c",
"x": "c",
"y": 30
}
]
}
]
}
},
{
"id": "channel",
"data": {
"type": "donut",
"data": [
{
"id": "online",
"label": "En línea",
"value": 12
},
{
"id": "store",
"label": "Tienda",
"value": 18
}
]
}
}
],
"links": [
{
"fromNodeId": "regions",
"datumId": {
"seriesId": "nodes",
"pointId": "north"
},
"toNodeId": "north"
},
{
"fromNodeId": "north",
"datumId": {
"seriesId": "orders",
"pointId": "c"
},
"toNodeId": "channel"
}
]
};
readonly options: ChartDrilldownOptions = {
chart: {
"animation": {
"enabled": true
},
"locale": "es",
"theme": "light",
toolbar: {
actions: [ChartToolbarAction.Csv, ChartToolbarAction.Png, ChartToolbarAction.Svg],
position: ChartToolbarPosition.Top,
}
},
"nodes": {
"regions": {
"title": "Explora las regiones",
"description": "Selecciona Norte y abre su detalle.",
"height": 220,
"hierarchy": {
"orientation": "vertical"
},
"legend": {
"visible": true,
"position": "bottom",
"interactive": true
},
"appearance": {
"colors": [
"#2C6DCD",
"#8392A6"
],
"dataLabels": true
}
},
"north": {
"title": "Norte · detalle original",
"description": "A: 0 · B: 10 · C: 30. Abre C para ver los canales.",
"height": 220,
"unit": "pedidos",
"legend": {
"position": "bottom"
},
"viewport": {
"axes": "x",
"controls": true
},
"appearance": {}
},
"channel": {
"title": "C · canales",
"height": 220,
"unit": "pedidos",
"legend": {
"position": "bottom"
},
"appearance": {}
}
}
};
}Datos, opciones y eventos
Los enlaces usan los IDs originales. Selecciona un punto y abre su detalle. Al volver se recupera la vista anterior.