mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
plotly.js - add plotly types for indicator chart (#39185)
This commit is contained in:
committed by
Wesley Wigham
parent
3619b2f43d
commit
5e19dd4a56
Vendored
+56
-4
@@ -13,6 +13,7 @@
|
||||
// Josh Miles <https://github.com/milesjos>
|
||||
// Pramod Mathai <https://github.com/skippercool>
|
||||
// Takafumi Yamaguchi <https://github.com/zeroyoichihachi>
|
||||
// Michael Adams <https://github.com/mtadams007>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -498,9 +499,9 @@ export type DataTransform = Partial<Transform>;
|
||||
export type ScatterData = PlotData;
|
||||
// Bar Scatter
|
||||
export interface PlotData {
|
||||
type: 'bar' | 'box' | 'candlestick' | 'choropleth' | 'contour' | 'heatmap' | 'histogram' | 'mesh3d' |
|
||||
'ohlc' | 'parcoords' | 'pie' | 'pointcloud' | 'scatter' | 'scatter3d' | 'scattergeo' | 'scattergl' |
|
||||
'scatterpolar' | 'scatterternary' | 'surface';
|
||||
type: 'bar' | 'box' | 'candlestick' | 'choropleth' | 'contour' | 'heatmap' | 'histogram' | 'indicator' | 'mesh3d' |
|
||||
'ohlc' | 'parcoords' | 'pie' | 'pointcloud' | 'scatter' | 'scatter3d' | 'scattergeo' | 'scattergl' |
|
||||
'scatterpolar' | 'scatterternary' | 'surface';
|
||||
x: Datum[] | Datum[][] | TypedArray;
|
||||
y: Datum[] | Datum[][] | TypedArray;
|
||||
z: Datum[] | Datum[][] | Datum[][][] | TypedArray;
|
||||
@@ -530,7 +531,8 @@ export interface PlotData {
|
||||
'marker.showscale': boolean;
|
||||
'marker.line': Partial<ScatterMarkerLine>;
|
||||
'marker.colorbar': {}; // TODO
|
||||
mode: 'lines' | 'markers' | 'text' | 'lines+markers' | 'text+markers' | 'text+lines' | 'text+lines+markers' | 'none';
|
||||
mode: 'lines' | 'markers' | 'text' | 'lines+markers' | 'text+markers' | 'text+lines' | 'text+lines+markers' | 'none'
|
||||
| 'gauge' | 'number' | 'delta' | 'number+delta' | 'gauge+number' | 'gauge+number+delta' | 'gauge+delta';
|
||||
hoveron: 'points' | 'fills';
|
||||
hoverinfo: 'all' | 'name' | 'none' | 'skip' | 'text' |
|
||||
'x' | 'x+text' | 'x+name' |
|
||||
@@ -556,6 +558,55 @@ export interface PlotData {
|
||||
stackgroup: string;
|
||||
connectgaps: boolean;
|
||||
visible: boolean | 'legendonly';
|
||||
delta: {
|
||||
reference: number;
|
||||
position: 'top' | 'bottom' | 'left' | 'right';
|
||||
relative: boolean
|
||||
valueformat: string
|
||||
increasing: {
|
||||
symbol: string;
|
||||
color: Color;
|
||||
}
|
||||
decreasing: {
|
||||
symbol: string;
|
||||
color: Color;
|
||||
}
|
||||
};
|
||||
gauge: {
|
||||
shape: 'angular' | 'bullet'
|
||||
bar: {
|
||||
color: Color
|
||||
line: {
|
||||
color: Color
|
||||
width: number
|
||||
}
|
||||
thickness: number
|
||||
}
|
||||
bgcolor: Color
|
||||
bordercolor: Color
|
||||
borderwidth: number
|
||||
axis: {
|
||||
range: number[]
|
||||
visible: boolean
|
||||
}
|
||||
threshold: {
|
||||
line: {
|
||||
color: Color
|
||||
width: number
|
||||
}
|
||||
value: number
|
||||
}
|
||||
};
|
||||
number: {
|
||||
valueformat: string
|
||||
font: {
|
||||
family: string
|
||||
size: number
|
||||
color: Color
|
||||
}
|
||||
prefix: string
|
||||
suffix: string
|
||||
};
|
||||
transforms: DataTransform[];
|
||||
orientation: 'v' | 'h';
|
||||
width: number | number[];
|
||||
@@ -571,6 +622,7 @@ export interface PlotData {
|
||||
end: number | string;
|
||||
size: number | string;
|
||||
};
|
||||
value: number;
|
||||
values: Datum[];
|
||||
labels: Datum[];
|
||||
hole: number;
|
||||
|
||||
Reference in New Issue
Block a user