@equinor/videx-wellog
Version:
Visualisation components for wellbore log data
40 lines (39 loc) • 1.18 kB
TypeScript
import { Range, Scale } from '../common/interfaces';
import { DipPlotData, PlotData, PlotOptions } from './interfaces';
/**
* Abstract base class for plots
*/
export default abstract class Plot<PLOT_OPTIONS extends PlotOptions = PlotOptions> {
id: string | number;
options: PLOT_OPTIONS;
data: PlotData | DipPlotData | any;
scale: Scale;
range: Range;
constructor(id: string | number, options?: PLOT_OPTIONS);
get offset(): number;
/**
* Set range of plot scale
*/
setRange(range: Range): Plot;
/**
* Sets the plot data
* @param data Data for all plots on track
* @param scale
* @param plots Plots on track
*/
setData(data: any, scale?: Scale, plotOptions?: Map<string | number, PLOT_OPTIONS>): Plot;
/**
* Set option
*/
setOption(key: string, value: any): Plot;
/**
* Set multiple options
* @param options object containing options to set
*/
setOptions(options: any): Plot;
updateDynamicScale(data: any, graphOptions: any): void;
/**
* Plot function should be overridden
*/
plot(ctx: CanvasRenderingContext2D, scale: Scale): void;
}