import { LinkedAmplitudeScale, LinkedTimeScale, AMPLITUDE_MODE } from "./scale.mjs";
import { SeismogramDisplayData } from "./seismogram.mjs";
import { Interval, Zone } from "luxon";
import type { AxisDomain } from "d3-axis";
export type MarginType = {
top: number;
right: number;
bottom: number;
left: number;
toString?: () => string;
};
export declare const DEFAULT_TITLE = "{{#each seisDataList}}{{onlyChangesChannel ../seisDataList @index}} {{else}}No Data{{/each}}";
export declare class SeismographConfigCache {
titleHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
xLabelHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
xSublabelHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
yLabelHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
yLabelRightHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
ySublabelHandlebarsCompiled: null | ((arg0: object, arg1: object) => string);
constructor();
}
/**
* Configuration object for Seismograph display.
*
*/
export declare class SeismographConfig {
/** @private */
static _lastID: number;
configId: number;
/** @private */
__cache__: SeismographConfigCache;
_timeFormat: null | ((date: Date) => string);
relativeTimeFormat: (value: number) => string;
amplitudeFormat: (value: number) => string;
showTitle: boolean;
/** @private */
_title: Array;
/** @private */
isXAxis: boolean;
xAxisTimeZone: null | string | Zone;
isXAxisTop: boolean;
/** @private */
_xLabel: string;
xLabelOrientation: string;
/** @private */
_xSublabel: string;
xSublabelIsUnits: boolean;
/**
* Should grid lines be drawn for each tick on the x axis.
*/
xGridLines: boolean;
isYAxis: boolean;
isYAxisRight: boolean;
isYAxisNice: boolean;
/**
* hint for number of ticks to show on y axis. Note this is not exact as
* trying to put ticks on "even" numbers may result in slightly more or less.
*/
yAxisNumTickHint: number;
/** @private */
_yLabel: string;
/** @private */
_yLabelRight: string;
yLabelOrientation: string;
/** @private */
_ySublabel: string;
ySublabelTrans: number;
ySublabelIsUnits: boolean;
yGridLines: boolean;
doMarkers: boolean;
markerTextOffset: number;
markerTextAngle: number;
markerFlagpoleBase: string;
minHeight: number;
maxHeight: null | number;
minWidth: number;
maxWidth: null | number;
margin: MarginType;
segmentDrawCompressedCutoff: number;
maxZoomPixelPerSample: number;
connectSegments: boolean;
lineColors: Array;
lineWidth: number;
gridLineColor: string;
allowZoom: boolean;
wheelZoom: boolean;
amplitudeMode: AMPLITUDE_MODE;
doGain: boolean;
windowAmp: boolean;
resolutionScale: number;
/** @private */
_fixedAmplitudeScale: null | Array;
/** @private */
_fixedTimeScale: null | Interval;
/** @private */
_linkedAmplitudeScale: null | LinkedAmplitudeScale;
/** @private */
_linkedTimeScale: null | LinkedTimeScale;
isRelativeTime: boolean;
constructor();
static fromJSON(json: SeismographConfigJsonType): SeismographConfig;
asJSON(): SeismographConfigJsonType;
get fixedAmplitudeScale(): null | Array;
set fixedAmplitudeScale(ts: null | Array);
get linkedAmplitudeScale(): null | LinkedAmplitudeScale;
set linkedAmplitudeScale(ts: null | LinkedAmplitudeScale);
/**
* Enable linked amplitude scales across seismographs.
*
*/
enableLinkedAmplitude(): void;
/**
* Set Raw amplitude mode, plot absolute and
* goes from minimun to maximum of data
*/
amplitudeRaw(): void;
/**
* Set MinMax amplitude mode, plot is relative and
* centered on (minimun + maximum)/2
*/
amplitudeMinMax(): void;
/**
* Set Mean amplitude mode, plot is relative and
* centered on mean of data
*/
amplitudeMean(): void;
/**
* Set WithZero amplitude mode, plot is absolute and
* centered on mean of data like Raw, but also includes zero
* even if all data is positive. Useful when showing
* data compared to zero is helpful.
*/
amplitudeWithZero(): void;
/**
* True if the amplitude is "centered".
*
* Both MinMax and Mean center the amplitude, Raw and Zero do not.
*
* @returns if centered
*/
isCenteredAmp(): boolean;
get fixedTimeScale(): null | Interval;
set fixedTimeScale(ts: null | Interval);
get linkedTimeScale(): null | LinkedTimeScale;
set linkedTimeScale(ts: null | LinkedTimeScale);
/**
* Configures the time axis to show times in the given time zone. This
* replaces timeFormat with createTimeFormatterForZone() and
* sets xSublabel to be the zone name. If zone is null, uses UTC.
*
* @param zone string like "US/Eastern" or luxon Zone
*/
enableXAxisTimeZone(zone: null | Zone | string): void;
/**
* Time formatter used by the x axis. Defaults to UTC via
* createTimeFormatterForZone(zone).
* Set xAxisTimeZone to change the time zone.
* @return formatter for x axis time labels
*/
get timeFormat(): (arg0: Date) => string;
set timeFormat(formatter: (arg0: Date) => string);
/**
* gets the current title
*
* @returns title as an array of strings
*/
get title(): Array;
/**
* Sets the title as simple string or array of strings or a
* handlebars template. If an array
* then each item will be in a separate tspan for easier formatting.
*
* @param value string or array of strings to be the title
*/
set title(value: null | string | Array);
handlebarsTitle(context: object, runtimeOptions: object): string;
/**
* gets the current x label
*
* @returns x label
*/
get xLabel(): string;
/**
* Sets the xLabel as simple string or a
* handlebars template.
*
* @param value string to be the x label
*/
set xLabel(value: null | string);
/**
* gets the current x sublabel
*
* @returns x sublabel
*/
get xSublabel(): string;
/**
* Sets the xSublabel as simple string or a
* handlebars template.
*
* @param value string to be the x sublabel
*/
set xSublabel(value: null | string);
handlebarsXLabel(context: object, runtimeOptions: object): string;
handlebarsXSublabel(context: object, runtimeOptions: object): string;
/**
* gets the current y label
*
* @returns yLabel
*/
get yLabel(): string;
/**
* Sets the ylabel as simple string or a
* handlebars template.
*
* @param value string to be the y label
*/
set yLabel(value: null | string);
/**
* gets the current y sublabel
*
* @returns ySublabel
*/
get ySublabel(): string;
/**
* Sets the y sublabel as simple string or a
* handlebars template.
*
* @param value string to be the y sublabel
*/
set ySublabel(value: null | string);
handlebarsYLabel(context: object, runtimeOptions: object): string;
handlebarsYSublabel(context: object, runtimeOptions: object): string;
/**
* gets the current title
*
* @returns yLabel
*/
get yLabelRight(): string;
/**
* Sets the ylabel as simple string or a
* handlebars template.
*
* @param value string to be the y label
*/
set yLabelRight(value: null | string);
handlebarsYLabelRight(context: object, runtimeOptions: object): string;
/**
* Fake data to use to test alignment of seismograph axis and between canvas
* and svg drawing.
*
* @param timeRange start and end of fake data
* @param min min amplitude for fake data, default is -100
* @param max max amplitude for fake data, default is 100
* @returns fake data
*/
createAlignmentData(timeRange: Interval, min?: number, max?: number): SeismogramDisplayData;
getColorForIndex(i: number): string;
createCSSForLineColors(svgClass?: string): string;
clone(): SeismographConfig;
toString(): string;
}
export type SeismographConfigJsonType = {
configId: number;
showTitle: boolean;
title: Array;
isXAxis: boolean;
xAxisTimeZone: string;
isXAxisTop: boolean;
xLabel: string;
xLabelOrientation: string;
xSublabel: string;
xSublabelIsUnits: boolean;
isYAxis: boolean;
isYAxisRight: boolean;
isYAxisNice: boolean;
yLabel: string;
yLabelRight: string;
yLabelOrientation: string;
ySublabel: string;
ySublabelTrans: number;
ySublabelIsUnits: boolean;
doMarkers: boolean;
markerTextOffset: number;
markerTextAngle: number;
markerFlagpoleBase: string;
minHeight: number;
maxHeight: null | number;
minWidth: number;
maxWidth: null | number;
margin: MarginType;
segmentDrawCompressedCutoff: number;
maxZoomPixelPerSample: number;
connectSegments: boolean;
lineColors: Array;
lineWidth: number;
wheelZoom: boolean;
amplitudeMode: AMPLITUDE_MODE;
doGain: boolean;
windowAmp: boolean;
fixedAmplitudeScale: null | Array;
fixedTimeScale: null | Interval;
isLinkedAmplitudeScale: boolean;
isLinkedTimeScale: boolean;
isRelativeTime: boolean;
};
export declare function numberFormatWrapper(formater: (arg0: number) => string): (domainValue: AxisDomain) => string;
export declare const formatCount: (arg0: number) => string;
export declare const formatExp: (arg0: number) => string;
export declare const formatCountOrAmp: (v: number) => string;
export declare function createTimeFormatterForZone(timezone: Zone): (arg0: Date) => string;
//# sourceMappingURL=seismographconfig.d.mts.map