import { GridOptions , BarSparklineOptions } from '@ag-grid-community/core' ; const gridOptions = { columnDefs : [ { field : 'symbol' , maxWidth : 120 } , { field : 'name' , minWidth : 250 } , { field : 'change' , cellRenderer : 'agSparklineCellRenderer' , cellRendererParams : { sparklineOptions : { type : 'bar' , fill : '#5470c6' , stroke : '#91cc75' , highlightStyle : { fill : '#fac858' , } , valueAxisDomain : [ 0 , 1 ] , } as BarSparklineOptions , } , } , { field : 'volume' , type : 'numericColumn' , maxWidth : 140 , } , ] , defaultColDef : { flex : 1 , minWidth : 100 , resizable : true , } , rowData : getData ( ) , rowHeight : 50 , } ; document . addEventListener ( 'DOMContentLoaded' , function ( ) { var gridDiv = document . querySelector ( '#myGrid' ) ; new agGrid . Grid ( gridDiv , gridOptions ) ; } ) ;