From f0c07668ad5e63fd94153899e508d02b1419bcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Gr=C5=88o?= Date: Tue, 4 Sep 2018 18:20:40 +0200 Subject: [PATCH] Add API for error bars --- types/plotly.js/index.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index fa312dbb0f..53d818bd94 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -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; @@ -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[];