@future-grid/fgp-graph
Version:
fgp-graph is a chart lib based on Dygraphs
61 lines (60 loc) • 2.23 kB
TypeScript
import Dygraph from 'dygraphs';
import { DomAttrs, ViewConfig } from '../metadata/configurations';
import FgpGraph from "../index";
import { EventHandlers } from "../metadata/graphoptions";
export declare class DomElementOperator {
static createElement: (type: string, attrs: DomAttrs[]) => HTMLElement;
}
export declare class GraphOperator {
static FIELD_PATTERN: RegExp;
private graphId?;
defaultGraphRanges: Array<{
name: string;
value: number;
show?: boolean;
}>;
createElement: (type: string, attrs: DomAttrs[]) => HTMLElement;
private mainGraph;
private rangebarGraph;
private currentView;
private currentCollection;
private rangeCollection;
private start;
private end;
datewindowCallback: any;
private currentDateWindow?;
private currentGraphData;
private readonly graphContainer;
private readonly graphBody;
private readonly spinner;
private xBoundary;
private readonly yAxisBtnArea;
private readonly y2AxisBtnArea;
private lockedInterval;
private eventListeners?;
private readonly graphInstance;
private toolbar?;
private rectSelection?;
private colorLocked;
private readonly needSync;
private axesConfig?;
private yScaleBtns;
private yScaleLockStatus;
constructor(mainGraph: Dygraph, rangeGraph: Dygraph, graphContainer: HTMLElement, graphBody: HTMLElement, datewindowCallback: any, fgpGraph: FgpGraph, eventListeners?: EventHandlers, id?: string, needSync?: boolean);
recreateElement: (el: HTMLElement, withChildren: boolean) => void;
showSpinner: () => void;
/**
* call this method to highlight series
*/
highlightSeries: (series: string[], duration: number, type?: string | undefined) => void;
init: (view: ViewConfig, readyCallback?: any, interactionCallback?: any) => void;
refresh: () => void;
/**
* render graph
* @param first
* @param last
* @param refersh
* @param range
*/
update: (first?: number | undefined, last?: number | undefined, refersh?: boolean | undefined, range?: [number, number] | undefined, readyCallback?: ((graph: any) => void) | undefined) => false | undefined;
}