UNPKG

@future-grid/fgp-graph

Version:

fgp-graph is a chart lib based on Dygraphs

58 lines (57 loc) 1.62 kB
import Dygraph from 'dygraphs'; export declare class Formatters { /** *show graph timestamp with this timezone * @type {string} * @memberof Formatters */ timezone: string; dateformat?: string; private TICK_PLACEMENT; private SHORT_SPACINGS; /** *Creates an instance of Formatters. * @param {string} timezone show graph timestamp with this timezone * @memberof Formatters */ constructor(timezone: string); /** * update date format for legend and range-bar * @param format */ setFormat: (format: string) => void; private numDateTicks; private pickDateTickGranularity; private zeropad; private getDateAxis; DateTickerTZ: (a: any, b: any, pixels: any, opts: any, dygraph: Dygraph, vals: any) => { v: any; label: any; }[]; /** * * legend formatter for multiple series * @param {any} data this data comes from graph * * @memberof Formatters */ legendForAllSeries: (data: any) => string; /** * * legend formatter for single series * @param {any} data this data comes from graph * * @memberof Formatters */ legendForSingleSeries: (data: any) => string; /** *formatter for axis label * @param {number|date} d * @param {number} granularity * @param {function} opts * @param {Dygraph} dygraph * @returns {string} * @memberof Formatters */ axisLabel: (d: number | Date, granularity: number, opts?: ((name: string) => any) | undefined, dygraph?: Dygraph | undefined) => any; }