Add API for error bars

This commit is contained in:
Michal Grňo
2018-09-04 18:20:40 +02:00
committed by GitHub
parent 1dcd7d9e18
commit f0c07668ad
+22
View File
@@ -434,6 +434,26 @@ export interface ModeBarButton {
export type Datum = string | number | Date | null;
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
export type ErrorOptions = {
type: 'constant' | 'percent',
value: number,
visible?: boolean,
color: Color,
thickness?: number,
width?: number,
opacity?: number
} | {
type: 'data',
array: Datum[],
arrayminus?: Datum[],
symmetric?: boolean,
visible?: boolean,
color: Color,
thickness?: number,
width?: number,
opacity?: number
};
export type Dash = 'solid' | 'dot' | 'dash' | 'longdash' | 'dashdot' | 'longdashdot';
export type Data = Partial<PlotData>;
@@ -447,6 +467,8 @@ export interface PlotData {
y: Datum[] | Datum[][] | TypedArray;
z: Datum[] | Datum[][] | Datum[][][] | TypedArray;
xy: Float32Array;
error_x: ErrorOptions;
error_y: ErrorOptions;
xaxis: string;
yaxis: string;
text: string | string[];