A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.ag-grid.com/javascript-data-grid/sparklines-overview/ below:

JavaScript Grid: Sparklines Overview | AG Grid

This section introduces the grid's built-in Sparklines - mini charts that are optimised for grid cells that can be used to provide insights into data trends at a glance. These sparklines can be fully customised to application's requirements.

Enabling Sparklines Copy Link

To enable sparklines on a particular column, add the agSparklineCellRenderer as shown below:

const gridOptions = {
    columnDefs: [
        {
            field: 'change',
            cellRenderer: 'agSparklineCellRenderer',
        },
        
    ],

    
}

Note in the snippet above that specifying an agSparklineCellRenderer will display the data using the default line sparkline.

The following example shows the minimum configuration required to display data in a sparkline. Note the following:

Sparkline Customisation Copy Link

The default Sparkline options act as a good starting point for most applications, however sparklines can be fully customised by overriding the default sparkline options.

Sparklines are customised by supplying sparklineOptions to the cellRendererParams on the Sparkline Cell Renderer as shown below:

const gridOptions = {
    columnDefs: [
        {
            cellRenderer: 'agSparklineCellRenderer',
            cellRendererParams: {
                sparklineOptions: {
                    
                }
            },
        },
        
    ],

    
}

Each Sparkline type contains specific sparklineOptions that can be overridden and are covered in the following sections:

The following sections are relevant to all sparkline types:

Next Up Copy Link

Continue to the next section to learn about: Area Customisation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4