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-api-sparkline-options/ below:

JavaScript Grid: Sparklines - API

Sparkline Options Copy Link

All sparkline types and interfaces are available from the ag-charts-community or ag-charts-enterprise packages.

import { AgSparklineOptions, ... } from 'ag-charts-community'; 

Per-type options for sparklines are available

Sparkline Item Styler Copy Link

Depending on series type, item stylers are either present on the main options object, or as a property of the markers object.

The signature is generally the same for all series types

function itemStyler(params: AgAreaSeriesMarkerItemStylerParams ): AgSeriesMarkerStyle {
    const { yValue } = params;
    return {
        fill: yValue > 0 ? 'green' : 'red'
    };
}

See AG Charts

The tooltip renderer is a function that can be provided to the sparkline options' tooltip object. It is called with the series datum and should return a string to be displayed in the tooltip.

const sparklineOptions: AgSparklineOptions = {
    tooltip: {
        renderer: (params: AgSeriesTooltipRendererParams<any>): AgTooltipRendererResult => {
            return `Value: ${params.datum.value}`;
        }
    }
};

See AG Charts Tooltips for more information on tooltip options.


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