← DataGrid API

Component · v2.7.0

NgbGridChartComponent

Composite grid and Chart.js-backed chart widget.

Import

import { NgbGridChartComponent } from '@angular-bootstrap/ngbootstrap';

Selector:ngb-grid-chart

Declaration

class NgbGridChartComponent<T = any> implements OnChanges, AfterViewInit, AfterViewChecked

Inputs

config

ariaLabel

ariaLabel: string

Default:'Grid chart'

Outputs

selectionChange

selectionChange: EventEmitter<NgbGridChartSelectionChange<T>>

Properties

gridColumns

gridColumns: ColumnDef<T>[]

Default:[]

chartConfig

chartConfig: NgbDataChartConfig | null

Default:null

dimensionTemplate

dimensionTemplate: boolean

Default:true

sparklineField

sparklineField: string | null

Default:null

sparklineColumns

sparklineColumns: ColumnDef<T>[]

Default:[]

tableOptions

readonly tableOptions: { responsive: boolean; hoverRows: boolean; zebraStripes: boolean; }

rowTrackBy

readonly rowTrackBy: (index: number, row: T) => string | number

chartAriaLabel

get chartAriaLabel(): string

Methods

sparklineValues

sparklineValues(row: T): number[]

sparklineColor

sparklineColor(row: T): string | null

isRowSelected

isRowSelected(row: T): boolean

seriesColor

seriesColor(row: T): string

onGridSelectionChange

onGridSelectionChange(event: { selected: T[]; }): void

Referenced types

Source: src/datagrid/src/chart/grid-chart.component.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.