sigplot-ts
Version:
TypeScript-based Integration Library for SigPlot 2.0
56 lines (55 loc) • 1.79 kB
TypeScript
/**
* Author: Thomas Goodwin
* Company: Geon Technologies, LLC
*
* (Abstract) Base Plot class to encourage a unified API going forward.
*/
import * as sigplot from 'sigplot';
import { ILayer } from '../layer/index';
import { Units } from '../m/index';
import { ConstructorOptions } from './constructor-options';
import { SettingsOptions } from './settings-options';
import { PlotData } from './plot-data';
/**
* BasePlot is an abstract base class for sigplot.Plot to help unify some of the
* API for downstream classes.
*
*/
export declare abstract class BasePlot {
_plot: sigplot.Plot;
/**
* The settings related to the current plot. For use with checkSettings.
*/
readonly settings: SettingsOptions;
/**
* If your ConstructorOptions use the default xlabel and ylabel, changing
* these values will update the X and Y labels by getting the string name
* of the enumeration (Units).
*/
xlab: Units;
ylab: Units;
/** The options used when creating the plot */
private _options;
/**
* @param el - The DOM element to draw within (div, etc.)
* @param options - The ConstructorOptions for this plot.
*/
constructor(el: any, options?: ConstructorOptions);
/**
* If you resize the DOM element for the plot, call this to cause the plot
* to redraw
*/
checkResize(): void;
/**
* Push any changes in the settings to the underlying plot instance.
*/
checkSettings(): void;
/**
* Update the plot with the data buffer
*/
abstract push(plotData: PlotData, ...args: any[]): any;
/** Get the plot layer for the data */
abstract getLayer(...args: any[]): ILayer;
/** Remove a/the plot layer */
abstract removeLayer(...args: any[]): void;
}