@fluentui/react-charting 5.23.42 → 5.23.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +25 -2
  3. package/bundle-size/DeclarativeChart.fixture.js +7 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/lib/components/DeclarativeChart/DeclarativeChart.js +66 -49
  7. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  8. package/lib/components/DeclarativeChart/PlotlySchema.d.ts +1516 -0
  9. package/lib/components/DeclarativeChart/PlotlySchema.js +4 -0
  10. package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  11. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +16 -13
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +221 -114
  13. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  14. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +5 -4
  15. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  16. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +10 -1
  17. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  18. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  19. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  20. package/lib/utilities/utilities.js +2 -9
  21. package/lib/utilities/utilities.js.map +1 -1
  22. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +64 -47
  23. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  24. package/lib-amd/components/DeclarativeChart/PlotlySchema.d.ts +1516 -0
  25. package/lib-amd/components/DeclarativeChart/PlotlySchema.js +7 -0
  26. package/lib-amd/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  27. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +16 -13
  28. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +223 -115
  29. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  30. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +5 -4
  31. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  32. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +10 -1
  33. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  34. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  35. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  36. package/lib-amd/utilities/utilities.js +2 -9
  37. package/lib-amd/utilities/utilities.js.map +1 -1
  38. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +65 -48
  39. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  40. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.d.ts +1516 -0
  41. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +5 -0
  42. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  43. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +16 -13
  44. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +223 -115
  45. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  46. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +5 -4
  47. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  48. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +10 -1
  49. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  50. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  51. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  52. package/lib-commonjs/utilities/utilities.js +2 -9
  53. package/lib-commonjs/utilities/utilities.js.map +1 -1
  54. package/package.json +3 -3
@@ -0,0 +1,1516 @@
1
+ /**
2
+ * This interface is extracted from Plotly.js typescript definitions.
3
+ * All the unsupported types are removed to align with fluent charts.
4
+ * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts
5
+ */
6
+ export type PieColor = string | number;
7
+ export type PieColors = Array<PieColor | null | undefined>;
8
+ export interface PieFont {
9
+ family: string | string[];
10
+ size: number | number[];
11
+ color: PieColor | PieColors;
12
+ }
13
+ export interface PieDataTitle extends Pick<DataTitle, 'text' | 'position'> {
14
+ font: Partial<PieFont>;
15
+ }
16
+ export type PieTextPosition = 'inside' | 'outside' | 'auto' | 'none';
17
+ export type PieHoverInfo = 'all' | 'none' | 'skip' | 'label' | 'text' | 'value' | 'percent' | 'name' | 'label+text' | 'label+value' | 'label+percent' | 'label+name' | 'text+value' | 'text+percent' | 'text+name' | 'value+percent' | 'value+name' | 'percent+name' | 'label+text+value' | 'label+text+percent' | 'label+text+name' | 'label+value+percent' | 'label+value+name' | 'label+percent+name' | 'text+value+percent' | 'text+value+name' | 'text+percent+name' | 'value+percent+name' | 'label+text+value+percent' | 'label+text+value+name' | 'label+text+percent+name' | 'label+value+percent+name' | 'text+value+percent+name';
18
+ export interface PieDomain {
19
+ x: number[];
20
+ y: number[];
21
+ row: number;
22
+ column: number;
23
+ }
24
+ export interface PieLine {
25
+ color: PieColor | PieColors;
26
+ width: number | number[];
27
+ }
28
+ export interface PieMarker {
29
+ colors: PieColors;
30
+ line: Partial<PieLine>;
31
+ }
32
+ export interface PieHoverLabel {
33
+ bgcolor: PieColor | PieColors;
34
+ bordercolor: PieColor | PieColors;
35
+ font: PieFont;
36
+ align: HoverLabel['align'] | Array<HoverLabel['align']>;
37
+ namelength: number | number[];
38
+ }
39
+ export type PieInsideTextOrientation = 'horizontal' | 'radial' | 'tangential' | 'auto';
40
+ export interface PieData extends Pick<PlotData, 'name' | 'visible' | 'showlegend' | 'legendgroup' | 'opacity' | 'ids' | 'labels' | 'hovertext' | 'automargin' | 'textinfo' | 'direction' | 'hole' | 'rotation'> {
41
+ type: 'pie';
42
+ title: Partial<PieDataTitle>;
43
+ values: Array<number | string>;
44
+ dlabel: number;
45
+ label0: number;
46
+ pull: number | number[];
47
+ text: Datum | Datum[];
48
+ textposition: PieTextPosition | PieTextPosition[];
49
+ texttemplate: string | string[];
50
+ hoverinfo: PieHoverInfo;
51
+ hovertemplate: string | string[];
52
+ meta: number | string;
53
+ customdata: Datum[];
54
+ domain: Partial<PieDomain>;
55
+ marker: Partial<PieMarker>;
56
+ textfont: PieFont;
57
+ hoverlabel: Partial<PieHoverLabel>;
58
+ insidetextfont: PieFont;
59
+ insidetextorientation: PieInsideTextOrientation;
60
+ outsidetextfont: PieFont;
61
+ scalegroup: string;
62
+ sort: boolean;
63
+ uirevision: number | string;
64
+ }
65
+ export type SankeyColor = string | number;
66
+ export type SankeyColors = Array<SankeyColor | null | undefined>;
67
+ export interface SankeyFont {
68
+ family: string | string[];
69
+ size: number | number[];
70
+ color: SankeyColor | SankeyColors;
71
+ }
72
+ export interface SankeyDataTitle {
73
+ font: Partial<SankeyFont>;
74
+ title: string;
75
+ }
76
+ export type SankeyOrientation = 'v' | 'h';
77
+ export interface SankeyHoverLabel {
78
+ bgcolor: SankeyColor | SankeyColors;
79
+ bordercolor: SankeyColor | SankeyColors;
80
+ font: SankeyFont;
81
+ align: HoverLabel['align'] | Array<HoverLabel['align']>;
82
+ namelength: number | number[];
83
+ }
84
+ export interface SankeyDomain {
85
+ row: number;
86
+ column: number;
87
+ x: number[];
88
+ y: number[];
89
+ }
90
+ export interface SankeyNode {
91
+ color: SankeyColor[];
92
+ customdata: Datum[];
93
+ groups: SankeyNode[];
94
+ hoverinfo: 'all' | 'none' | 'skip';
95
+ hoverlabel: Partial<SankeyHoverLabel>;
96
+ hovertemplate: string | string[];
97
+ label: Datum[];
98
+ line: Partial<{
99
+ color: SankeyColor;
100
+ width: number;
101
+ }>;
102
+ pad: number;
103
+ thickness: number;
104
+ x: number[];
105
+ y: number[];
106
+ }
107
+ export interface SankeyColorscale {
108
+ cmax: number;
109
+ cmin: number;
110
+ colorscale: Array<[number, string]>;
111
+ label: string;
112
+ name: string;
113
+ templateitemname: string;
114
+ }
115
+ export interface SankeyLink {
116
+ arrowlen: number;
117
+ color: SankeyColor | SankeyColor[];
118
+ colorscale: Partial<SankeyColorscale>;
119
+ customdata: Datum[];
120
+ hoverinfo: 'all' | 'none' | 'skip';
121
+ hoverlabel: Partial<SankeyHoverLabel>;
122
+ hovertemplate: string | string[];
123
+ hovercolor: SankeyColor | SankeyColor[];
124
+ label: Datum[];
125
+ line: Partial<{
126
+ color: SankeyColor;
127
+ width: number;
128
+ }>;
129
+ source: number[];
130
+ target: number[];
131
+ value: number[];
132
+ }
133
+ export interface SankeyData {
134
+ type: 'sankey';
135
+ name: string;
136
+ orientation: SankeyOrientation;
137
+ visible: boolean | 'legendonly';
138
+ legend: string;
139
+ legendrank: number;
140
+ legendgrouptitle: Partial<SankeyDataTitle>;
141
+ legendwidth: number;
142
+ ids: string[];
143
+ hoverinfo: string;
144
+ meta: number | string;
145
+ customdata: Datum[];
146
+ domain: Partial<SankeyDomain>;
147
+ node: Partial<SankeyNode>;
148
+ link: Partial<SankeyLink>;
149
+ textfont: Partial<SankeyFont>;
150
+ selectpoints: string | number;
151
+ arrangement: 'snap' | 'perpendicular' | 'freeform' | 'fixed';
152
+ hoverlabel: Partial<SankeyHoverLabel>;
153
+ valueformat: string;
154
+ valuesuffix: string;
155
+ uirevision: string | number;
156
+ }
157
+ export interface Point {
158
+ x: number;
159
+ y: number;
160
+ z: number;
161
+ }
162
+ export interface PlotScatterDataPoint {
163
+ curveNumber: number;
164
+ data: PlotData;
165
+ pointIndex: number;
166
+ pointNumber: number;
167
+ x: number;
168
+ xaxis: LayoutAxis;
169
+ y: number;
170
+ yaxis: LayoutAxis;
171
+ }
172
+ export interface PlotDatum {
173
+ curveNumber: number;
174
+ data: PlotData;
175
+ customdata: Datum;
176
+ pointIndex: number;
177
+ pointNumber: number;
178
+ x: Datum;
179
+ xaxis: LayoutAxis;
180
+ y: Datum;
181
+ yaxis: LayoutAxis;
182
+ text: string;
183
+ }
184
+ export interface PlotCoordinate {
185
+ x: number;
186
+ y: number;
187
+ pointNumber: number;
188
+ }
189
+ export interface SelectionRange {
190
+ x: number[];
191
+ y: number[];
192
+ }
193
+ export type PlotSelectedData = Partial<PlotDatum>;
194
+ export interface PlotScene {
195
+ center: Point;
196
+ eye: Point;
197
+ up: Point;
198
+ }
199
+ export interface PolarLayout {
200
+ domain: Partial<Domain>;
201
+ sector: number[];
202
+ hole: number;
203
+ bgcolor: Color;
204
+ radialaxis: Partial<LayoutAxis>;
205
+ angularaxis: Partial<LayoutAxis>;
206
+ gridshape: 'circular' | 'linear';
207
+ uirevision: string | number;
208
+ uid: string;
209
+ }
210
+ export interface PlotlySchema {
211
+ data: Data[];
212
+ layout?: Partial<Layout>;
213
+ config?: Partial<Config>;
214
+ }
215
+ export interface Layout {
216
+ colorway: string[];
217
+ title: string | Partial<{
218
+ text: string;
219
+ font: Partial<Font>;
220
+ xref: 'container' | 'paper';
221
+ yref: 'container' | 'paper';
222
+ x: number;
223
+ y: number;
224
+ xanchor: 'auto' | 'left' | 'center' | 'right';
225
+ yanchor: 'auto' | 'top' | 'middle' | 'bottom';
226
+ pad: Partial<Padding>;
227
+ }>;
228
+ titlefont: Partial<Font>;
229
+ autosize: boolean;
230
+ showlegend: boolean;
231
+ paper_bgcolor: Color;
232
+ plot_bgcolor: Color;
233
+ separators: string;
234
+ hidesources: boolean;
235
+ xaxis: Partial<LayoutAxis>;
236
+ xaxis2: Partial<LayoutAxis>;
237
+ xaxis3: Partial<LayoutAxis>;
238
+ xaxis4: Partial<LayoutAxis>;
239
+ xaxis5: Partial<LayoutAxis>;
240
+ xaxis6: Partial<LayoutAxis>;
241
+ xaxis7: Partial<LayoutAxis>;
242
+ xaxis8: Partial<LayoutAxis>;
243
+ xaxis9: Partial<LayoutAxis>;
244
+ yaxis: Partial<LayoutAxis>;
245
+ yaxis2: Partial<LayoutAxis>;
246
+ yaxis3: Partial<LayoutAxis>;
247
+ yaxis4: Partial<LayoutAxis>;
248
+ yaxis5: Partial<LayoutAxis>;
249
+ yaxis6: Partial<LayoutAxis>;
250
+ yaxis7: Partial<LayoutAxis>;
251
+ yaxis8: Partial<LayoutAxis>;
252
+ yaxis9: Partial<LayoutAxis>;
253
+ margin: Partial<Margin>;
254
+ height: number;
255
+ width: number;
256
+ hovermode: 'closest' | 'x' | 'y' | 'x unified' | 'y unified' | false;
257
+ hoverdistance: number;
258
+ hoverlabel: Partial<HoverLabel>;
259
+ calendar: Calendar;
260
+ 'xaxis.range': [Datum, Datum];
261
+ 'xaxis.range[0]': Datum;
262
+ 'xaxis.range[1]': Datum;
263
+ 'yaxis.range': [Datum, Datum];
264
+ 'yaxis.range[0]': Datum;
265
+ 'yaxis.range[1]': Datum;
266
+ 'yaxis.type': AxisType;
267
+ 'xaxis.type': AxisType;
268
+ 'xaxis.autorange': boolean;
269
+ 'yaxis.autorange': boolean;
270
+ 'xaxis.title': string;
271
+ 'yaxis.title': string;
272
+ ternary: any;
273
+ geo: any;
274
+ mapbox: any;
275
+ subplot: string;
276
+ radialaxis: Partial<Axis>;
277
+ angularaxis: {};
278
+ dragmode: 'zoom' | 'pan' | 'select' | 'lasso' | 'drawclosedpath' | 'drawopenpath' | 'drawline' | 'drawrect' | 'drawcircle' | 'orbit' | 'turntable' | false;
279
+ orientation: number;
280
+ annotations: Array<Partial<Annotations>>;
281
+ shapes: Array<Partial<Shape>>;
282
+ legend: Partial<Legend>;
283
+ font: Partial<Font>;
284
+ barmode: 'stack' | 'group' | 'overlay' | 'relative';
285
+ barnorm: '' | 'fraction' | 'percent';
286
+ bargap: number;
287
+ bargroupgap: number;
288
+ boxmode: 'group' | 'overlay';
289
+ selectdirection: 'h' | 'v' | 'd' | 'any';
290
+ hiddenlabels: string[];
291
+ grid: Partial<{
292
+ rows: number;
293
+ roworder: 'top to bottom' | 'bottom to top';
294
+ columns: number;
295
+ subplots: string[];
296
+ xaxes: string[];
297
+ yaxes: string[];
298
+ pattern: 'independent' | 'coupled';
299
+ xgap: number;
300
+ ygap: number;
301
+ domain: Partial<{
302
+ x: number[];
303
+ y: number[];
304
+ }>;
305
+ xside: 'bottom' | 'bottom plot' | 'top plot' | 'top';
306
+ yside: 'left' | 'left plot' | 'right plot' | 'right';
307
+ }>;
308
+ polar: Partial<PolarLayout>;
309
+ polar2: Partial<PolarLayout>;
310
+ polar3: Partial<PolarLayout>;
311
+ polar4: Partial<PolarLayout>;
312
+ polar5: Partial<PolarLayout>;
313
+ polar6: Partial<PolarLayout>;
314
+ polar7: Partial<PolarLayout>;
315
+ polar8: Partial<PolarLayout>;
316
+ polar9: Partial<PolarLayout>;
317
+ template: Template;
318
+ clickmode: 'event' | 'select' | 'event+select' | 'none';
319
+ uirevision: number | string;
320
+ uid: string;
321
+ datarevision: number | string;
322
+ editrevision: number | string;
323
+ selectionrevision: number | string;
324
+ }
325
+ export interface Legend extends Label {
326
+ borderwidth: number;
327
+ groupclick: 'toggleitem' | 'togglegroup';
328
+ grouptitlefont: Partial<Font>;
329
+ itemclick: 'toggle' | 'toggleothers' | false;
330
+ itemdoubleclick: 'toggle' | 'toggleothers' | false;
331
+ itemsizing: 'trace' | 'constant';
332
+ itemwidth: number;
333
+ orientation: 'v' | 'h';
334
+ title: Partial<LegendTitle>;
335
+ tracegroupgap: number;
336
+ traceorder: 'grouped' | 'normal' | 'reversed' | 'reversed+grouped';
337
+ uirevision: number | string;
338
+ uid: string;
339
+ valign: 'top' | 'middle' | 'bottom';
340
+ x: number;
341
+ xanchor: 'auto' | 'left' | 'center' | 'right';
342
+ xref: 'container' | 'paper';
343
+ y: number;
344
+ yanchor: 'auto' | 'top' | 'middle' | 'bottom';
345
+ yref: 'container' | 'paper';
346
+ }
347
+ export type AxisType = '-' | 'linear' | 'log' | 'date' | 'category' | 'multicategory';
348
+ export type DTickValue = number | string;
349
+ export interface TickFormatStop {
350
+ /**
351
+ * Determines whether or not this stop is used. If `false`,
352
+ * this stop is ignored even within its `dtickrange`.
353
+ */
354
+ enabled: boolean;
355
+ /**
356
+ * Range [`min`, `max`], where `min`, `max` - dtick values
357
+ * which describe some zoom level, it is possible to omit `min` or `max`
358
+ * value by passing `null`
359
+ */
360
+ dtickrange: [DTickValue | null, DTickValue | null];
361
+ /**
362
+ * dtickformat for described zoom level, the same as `tickformat`
363
+ */
364
+ value: string;
365
+ /**
366
+ * When used in a template, named items are created in the output figure
367
+ * in addition to any items the figure already has in this array.
368
+ * You can modify these items in the output figure by making
369
+ * your own item with `templateitemname` matching this `name`
370
+ * alongside your modifications (including `visible: false` or `enabled: false` to hide it).
371
+ * Has no effect outside of a template.
372
+ */
373
+ name: string;
374
+ /**
375
+ * Used to refer to a named item in this array in the template.
376
+ * Named items from the template will be created even without
377
+ * a matching item in the input figure, but you can modify one by
378
+ * making an item with `templateitemname` matching its `name`,
379
+ * alongside your modifications (including `visible: false` or `enabled: false` to hide it).
380
+ * If there is no template or no matching item, this item will be hidden
381
+ * unless you explicitly show it with `visible: true`.
382
+ */
383
+ templateitemname: string;
384
+ }
385
+ export interface AutoRangeOptions {
386
+ clipmax: DTickValue;
387
+ clipmin: DTickValue;
388
+ include: DTickValue;
389
+ maxallowed: DTickValue;
390
+ minallowed: DTickValue;
391
+ }
392
+ export interface MinorAxisLayout {
393
+ dtick: DTickValue;
394
+ gridcolor: Color;
395
+ griddash: Dash;
396
+ gridwidth: number;
397
+ nticks: number;
398
+ showgrid: boolean;
399
+ tick0: DTickValue;
400
+ tickcolor: Color;
401
+ ticklen: number;
402
+ tickmode: 'auto' | 'linear' | 'array';
403
+ ticks: 'outside' | 'inside' | '';
404
+ tickvals: any[];
405
+ tickwidth: number;
406
+ }
407
+ export interface RangeBreak {
408
+ bounds: any[];
409
+ dvalue: number;
410
+ enabled: boolean;
411
+ name: string;
412
+ pattern: 'day of week' | 'hour' | '';
413
+ templateitemname: string;
414
+ values: any[];
415
+ }
416
+ export interface Axis {
417
+ /**
418
+ * A single toggle to hide the axis while preserving interaction like dragging.
419
+ * Default is true when a cheater plot is present on the axis, otherwise
420
+ * false
421
+ */
422
+ visible: boolean;
423
+ /**
424
+ * Sets default for all colors associated with this axis
425
+ * all at once: line, font, tick, and grid colors.
426
+ * Grid color is lightened by blending this with the plot background
427
+ * Individual pieces can override this.
428
+ */
429
+ color: Color;
430
+ title: string | Partial<DataTitle>;
431
+ /**
432
+ * Former `titlefont` is now the sub-attribute `font` of `title`.
433
+ * To customize title font properties, please use `title.font` now.
434
+ */
435
+ titlefont: Partial<Font>;
436
+ type: AxisType;
437
+ autorange: true | false | 'reversed' | 'min reversed' | 'max reversed' | 'min' | 'max';
438
+ autorangeoptions: Partial<AutoRangeOptions>;
439
+ /**
440
+ * 'If *normal*, the range is computed in relation to the extrema
441
+ * of the input data.
442
+ * If *tozero*`, the range extends to 0,
443
+ * regardless of the input data
444
+ * If *nonnegative*, the range is non-negative,
445
+ * regardless of the input data.
446
+ * Applies only to linear axes.
447
+ */
448
+ rangemode: 'normal' | 'tozero' | 'nonnegative';
449
+ range: any[];
450
+ /**
451
+ * Determines whether or not this axis is zoom-able.
452
+ * If true, then zoom is disabled.
453
+ */
454
+ fixedrange: boolean;
455
+ /**
456
+ * Ticks
457
+ */
458
+ tickmode: 'auto' | 'linear' | 'array';
459
+ nticks: number;
460
+ tick0: number | string;
461
+ dtick: DTickValue;
462
+ tickvals: any[];
463
+ ticktext: string[];
464
+ ticks: 'outside' | 'inside' | '';
465
+ mirror: true | 'ticks' | false | 'all' | 'allticks';
466
+ ticklen: number;
467
+ tickwidth: number;
468
+ tickcolor: Color;
469
+ showticklabels: boolean;
470
+ showspikes: boolean;
471
+ spikecolor: Color;
472
+ spikethickness: number;
473
+ /**
474
+ * Specifies the ordering logic for the case of categorical variables.
475
+ * By default, plotly uses *trace*, which specifies the order that is present in the data supplied.
476
+ * Set `categoryorder` to *category ascending* or *category descending* if order should be determined by
477
+ * the alphanumerical order of the category names.
478
+ * Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category
479
+ * is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to
480
+ * the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.
481
+ * Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the
482
+ * numerical order of the values.
483
+ * Similarly, the order can be determined by the min, max, sum, mean or median of all the values.
484
+ */
485
+ categoryorder: 'trace' | 'category ascending' | 'category descending' | 'array' | 'total ascending' | 'total descending' | 'min ascending' | 'min descending' | 'max ascending' | 'max descending' | 'sum ascending' | 'sum descending' | 'mean ascending' | 'mean descending' | 'median ascending' | 'median descending';
486
+ categoryarray: any[];
487
+ tickfont: Partial<Font>;
488
+ tickangle: 'auto' | number;
489
+ tickprefix: string;
490
+ /**
491
+ * If `all`, all tick labels are displayed with a prefix.
492
+ * If `first`, only the first tick is displayed with a prefix.
493
+ * If `last`, only the last tick is displayed with a suffix.
494
+ * If `none`, tick prefixes are hidden.
495
+ */
496
+ showtickprefix: 'all' | 'first' | 'last' | 'none';
497
+ /**
498
+ * Sets a tick label suffix.
499
+ */
500
+ ticksuffix: string;
501
+ /**
502
+ * Same as `showtickprefix` but for tick suffixes.
503
+ */
504
+ showticksuffix: 'all' | 'first' | 'last' | 'none';
505
+ /**
506
+ * If `all`, all exponents are shown besides their significands.
507
+ * If `first`, only the exponent of the first tick is shown.
508
+ * If `last`, only the exponent of the last tick is shown.
509
+ * If `none`, no exponents appear.
510
+ */
511
+ showexponent: 'all' | 'first' | 'last' | 'none';
512
+ /**
513
+ * Determines a formatting rule for the tick exponents.
514
+ * For example, consider the number 1,000,000,000.
515
+ * If `none`, it appears as *1,000,000,000*.
516
+ * If `e`, *1e+9*.
517
+ * If `E`, *1E+9*.
518
+ * If `power`, *1x10^9* (with 9 in a super script).
519
+ * If `SI`, *1G*.
520
+ * If `B`, *1B*.
521
+ */
522
+ exponentformat: 'none' | 'e' | 'E' | 'power' | 'SI' | 'B';
523
+ /**
524
+ * Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B".
525
+ */
526
+ minexponent: number;
527
+ /**
528
+ * 'If `true`, even 4-digit integers are separated
529
+ */
530
+ separatethousands: boolean;
531
+ /**
532
+ * Sets the tick label formatting rule using d3 formatting mini-languages
533
+ * which are very similar to those in Python.
534
+ * For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format
535
+ * And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format
536
+ * We add one item to d3's date formatter: `%{n}f` for fractional seconds with n digits.
537
+ * For example, `"2016-10-13 09:15:23.456"` with tickformat `"%H~%M~%S.%2f"` would display `"09~15~23.46"`
538
+ */
539
+ tickformat: string;
540
+ /**
541
+ * Sets the hover text formatting rule using d3 formatting mini-languages
542
+ * which are very similar to those in Python.
543
+ * For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format
544
+ * And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format
545
+ * We add one item to d3's date formatter: `%{n}f` for fractional seconds with n digits.
546
+ * For example, `"2016-10-13 09:15:23.456"` with tickformat `"%H~%M~%S.%2f"` would display "09~15~23.46"
547
+ */
548
+ hoverformat: string;
549
+ calendar: Calendar;
550
+ /**
551
+ * Array of `Partial<TickFormatStop>` objects.
552
+ */
553
+ tickformatstops: Array<Partial<TickFormatStop>>;
554
+ spikedash: string;
555
+ /**
556
+ * Determines the drawing mode for the spike line.
557
+ * If `toaxis`, the line is drawn from the data point to the axis the
558
+ * series is plotted on.
559
+ * If `across`, the line is drawn across the entire plot area, and
560
+ * supercedes *toaxis*.
561
+ * If `marker`, then a marker dot is drawn on the axis the series is
562
+ * plotted on
563
+ */
564
+ spikemode: 'toaxis' | 'across' | 'marker' | 'toaxis+across' | 'toaxis+across+marker' | 'across+marker' | 'toaxis+marker';
565
+ /**
566
+ * Determines whether spikelines are stuck to the cursor or to the closest datapoints.
567
+ */
568
+ spikesnap: 'data' | 'cursor' | 'hovered data';
569
+ /**
570
+ * Lines and Grids
571
+ */
572
+ /**
573
+ * Determines whether or not a line bounding this axis is drawn.
574
+ */
575
+ showline: boolean;
576
+ /**
577
+ * Sets the axis line color
578
+ */
579
+ linecolor: Color;
580
+ /**
581
+ * Sets the width (in px) of the axis line.
582
+ */
583
+ linewidth: number;
584
+ /**
585
+ * Determines whether or not grid lines are drawn.
586
+ * If `true`, the grid lines are drawn at every tick mark.
587
+ */
588
+ showgrid: boolean;
589
+ /**
590
+ * Sets the color of the grid lines.
591
+ */
592
+ gridcolor: Color;
593
+ /**
594
+ * Sets the width (in px) of the grid lines.
595
+ */
596
+ gridwidth: number;
597
+ /**
598
+ * Determines whether or not a line is drawn at along the 0 value
599
+ * of this axis.
600
+ * If `true`, the zero line is drawn on top of the grid lines.
601
+ */
602
+ zeroline: boolean;
603
+ /**
604
+ * Sets the line color of the zero line.
605
+ */
606
+ zerolinecolor: Color;
607
+ /**
608
+ * Sets the width (in px) of the zero line.
609
+ */
610
+ zerolinewidth: number;
611
+ /**
612
+ * Determines whether or not a dividers are drawn
613
+ * between the category levels of this axis.
614
+ * Only has an effect on *multicategory* axes.
615
+ */
616
+ showdividers: boolean;
617
+ /**
618
+ * Sets the color of the dividers
619
+ * Only has an effect on *multicategory* axes.
620
+ */
621
+ dividercolor: Color;
622
+ /**
623
+ * Sets the width (in px) of the dividers
624
+ * Only has an effect on *multicategory* axes.
625
+ */
626
+ dividerwidth: number;
627
+ autotypenumbers: 'convert types' | 'strict';
628
+ labelalias: DTickValue;
629
+ maxallowed: DTickValue;
630
+ minallowed: DTickValue;
631
+ }
632
+ export type Calendar = 'gregorian' | 'chinese' | 'coptic' | 'discworld' | 'ethiopian' | 'hebrew' | 'islamic' | 'julian' | 'mayan' | 'nanakshahi' | 'nepali' | 'persian' | 'jalali' | 'taiwan' | 'thai' | 'ummalqura';
633
+ type xYAxisNames = `${'' | `${2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}` | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`}${'' | ' domain'}`;
634
+ export type XAxisName = `x${xYAxisNames}`;
635
+ export type YAxisName = `y${xYAxisNames}`;
636
+ export type AxisName = XAxisName | YAxisName;
637
+ export interface LayoutAxis extends Axis {
638
+ fixedrange: boolean;
639
+ scaleanchor: AxisName;
640
+ scaleratio: number;
641
+ constrain: 'range' | 'domain';
642
+ constraintoward: 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
643
+ anchor: 'free' | AxisName;
644
+ side: 'top' | 'bottom' | 'left' | 'right' | 'clockwise' | 'counterclockwise';
645
+ overlaying: 'free' | AxisName;
646
+ layer: 'above traces' | 'below traces';
647
+ domain: number[];
648
+ position: number;
649
+ rotation: number;
650
+ direction: 'counterclockwise' | 'clockwise';
651
+ rangeslider: Partial<RangeSlider>;
652
+ rangeselector: Partial<RangeSelector>;
653
+ automargin: boolean;
654
+ autotick: boolean;
655
+ angle: any;
656
+ griddash: Dash;
657
+ l2p: (v: Datum) => number;
658
+ autotickangles: number[];
659
+ insiderange: any[];
660
+ matches: AxisName;
661
+ minor: Partial<MinorAxisLayout>;
662
+ rangebreaks: Array<Partial<RangeBreak>>;
663
+ ticklabelmode: 'instant' | 'period';
664
+ ticklabeloverflow: 'allow' | 'hide past div' | 'hide past domain';
665
+ ticklabelposition: 'outside' | 'inside' | 'outside top' | 'inside top' | 'outside left' | 'inside left' | 'outside right' | 'inside right' | 'outside bottom' | 'inside bottom';
666
+ ticklabelstep: number;
667
+ tickson: 'labels' | 'boundaries';
668
+ uirevision: DTickValue;
669
+ }
670
+ export interface SceneAxis extends Axis {
671
+ spikesides: boolean;
672
+ showbackground: boolean;
673
+ backgroundcolor: Color;
674
+ showaxeslabels: boolean;
675
+ }
676
+ export interface ShapeLine {
677
+ color: string;
678
+ width: number;
679
+ dash: Dash;
680
+ }
681
+ export interface ShapeLabel {
682
+ font: Partial<Font>;
683
+ padding: number;
684
+ text: string;
685
+ textangle: 'auto' | number;
686
+ textposition: 'top left' | 'top center' | 'top right' | 'middle left' | 'middle center' | 'middle right' | 'bottom left' | 'bottom center' | 'bottom right' | 'start' | 'middle' | 'end';
687
+ texttemplate: string;
688
+ xanchor: 'auto' | 'left' | 'center' | 'right';
689
+ yanchor: 'top' | 'middle' | 'bottom';
690
+ }
691
+ export interface Shape {
692
+ visible: boolean | 'legendonly';
693
+ layer: 'below' | 'above';
694
+ type: 'rect' | 'circle' | 'line' | 'path';
695
+ path: string;
696
+ xref: 'paper' | XAxisName;
697
+ xsizemode: 'scaled' | 'pixel';
698
+ xanchor: number | string;
699
+ yref: 'paper' | YAxisName;
700
+ ysizemode: 'scaled' | 'pixel';
701
+ yanchor: number | string;
702
+ x0: Datum;
703
+ y0: Datum;
704
+ x1: Datum;
705
+ y1: Datum;
706
+ fillcolor: string;
707
+ name: string;
708
+ templateitemname: string;
709
+ opacity: number;
710
+ line: Partial<ShapeLine>;
711
+ label: Partial<ShapeLabel>;
712
+ showlegend: boolean;
713
+ legendgroup: string;
714
+ legendgrouptitle: {
715
+ text: string;
716
+ font?: Partial<Font>;
717
+ };
718
+ legendrank: number;
719
+ }
720
+ export interface Margin {
721
+ t: number;
722
+ b: number;
723
+ l: number;
724
+ r: number;
725
+ pad: number;
726
+ }
727
+ export interface Icon {
728
+ height?: number | undefined;
729
+ width?: number | undefined;
730
+ ascent?: number | undefined;
731
+ descent?: number | undefined;
732
+ name?: string | undefined;
733
+ path?: string | undefined;
734
+ svg?: string | undefined;
735
+ transform?: string | undefined;
736
+ }
737
+ export interface GaugeLine {
738
+ color: Color;
739
+ width: number;
740
+ }
741
+ export interface Threshold {
742
+ line: Partial<GaugeLine>;
743
+ value: number;
744
+ thickness: number;
745
+ }
746
+ export interface GaugeBar {
747
+ color: Color;
748
+ line: Partial<GaugeLine>;
749
+ thickness: number;
750
+ }
751
+ export interface Gauge {
752
+ shape: 'angular' | 'bullet';
753
+ bar: Partial<GaugeBar>;
754
+ bgcolor: Color;
755
+ bordercolor: Color;
756
+ borderwidth: number;
757
+ axis: Partial<Axis>;
758
+ steps: Array<{
759
+ range: number[];
760
+ color: Color;
761
+ }>;
762
+ threshold: Partial<Threshold>;
763
+ }
764
+ export interface Delta {
765
+ reference: number;
766
+ position: 'top' | 'bottom' | 'left' | 'right';
767
+ relative: boolean;
768
+ valueformat: string;
769
+ increasing: {
770
+ symbol: string;
771
+ color: Color;
772
+ };
773
+ decreasing: {
774
+ symbol: string;
775
+ color: Color;
776
+ };
777
+ }
778
+ export interface DataTitle {
779
+ text: string;
780
+ font: Partial<Font>;
781
+ standoff: number;
782
+ position: 'top left' | 'top center' | 'top right' | 'middle center' | 'bottom left' | 'bottom center' | 'bottom right';
783
+ }
784
+ export interface PlotNumber {
785
+ valueformat: string;
786
+ font: Partial<Font>;
787
+ prefix: string;
788
+ suffix: string;
789
+ }
790
+ export interface Template {
791
+ data?: {
792
+ [type in PlotType]?: Array<Partial<PlotData>>;
793
+ } | undefined;
794
+ layout?: Partial<Layout> | undefined;
795
+ }
796
+ export type Datum = string | number | Date | null;
797
+ export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
798
+ export interface ErrorOptions {
799
+ visible: boolean;
800
+ symmetric: boolean;
801
+ color: Color;
802
+ thickness: number;
803
+ width: number;
804
+ opacity: number;
805
+ }
806
+ export type ErrorBar = Partial<ErrorOptions> & ({
807
+ type: 'constant' | 'percent';
808
+ value: number;
809
+ valueminus?: number | undefined;
810
+ } | {
811
+ type: 'data';
812
+ array: Datum[];
813
+ arrayminus?: Datum[] | undefined;
814
+ });
815
+ export type Dash = 'solid' | 'dot' | 'dash' | 'longdash' | 'dashdot' | 'longdashdot';
816
+ export type PlotType = 'bar' | 'barpolar' | 'box' | 'candlestick' | 'carpet' | 'choropleth' | 'choroplethmapbox' | 'cone' | 'contour' | 'contourcarpet' | 'densitymapbox' | 'funnel' | 'funnelarea' | 'heatmap' | 'heatmapgl' | 'histogram' | 'histogram2d' | 'histogram2dcontour' | 'image' | 'indicator' | 'isosurface' | 'mesh3d' | 'ohlc' | 'parcats' | 'parcoords' | 'pie' | 'pointcloud' | 'sankey' | 'scatter' | 'scatter3d' | 'scattercarpet' | 'scattergeo' | 'scattergl' | 'scattermapbox' | 'scatterpolar' | 'scatterpolargl' | 'scatterternary' | 'splom' | 'streamtube' | 'sunburst' | 'surface' | 'table' | 'treemap' | 'violin' | 'volume' | 'waterfall';
817
+ export type Data = Partial<PlotData> | Partial<PieData> | Partial<SankeyData>;
818
+ export type Color = string | number | Array<string | number | undefined | null> | Array<Array<string | number | undefined | null>>;
819
+ export type ColorScale = string | string[] | Array<[number, string]>;
820
+ export type DataTransform = Partial<Transform>;
821
+ export type ScatterData = PlotData;
822
+ export interface PlotData {
823
+ type: PlotType;
824
+ x: Datum[] | Datum[][] | TypedArray;
825
+ y: Datum[] | Datum[][] | TypedArray;
826
+ z: Datum[] | Datum[][] | Datum[][][] | TypedArray;
827
+ i: TypedArray;
828
+ j: TypedArray;
829
+ k: TypedArray;
830
+ xy: Float32Array;
831
+ error_x: ErrorBar;
832
+ error_y: ErrorBar;
833
+ xaxis: string;
834
+ yaxis: string;
835
+ text: string | string[];
836
+ lat: Datum[];
837
+ lon: Datum[];
838
+ line: Partial<ScatterLine>;
839
+ 'line.color': Color;
840
+ 'line.width': number;
841
+ 'line.dash': Dash;
842
+ 'line.shape': 'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv';
843
+ 'line.smoothing': number;
844
+ 'line.simplify': boolean;
845
+ marker: Partial<PlotMarker>;
846
+ 'marker.symbol': MarkerSymbol | MarkerSymbol[];
847
+ 'marker.color': Color;
848
+ 'marker.colorscale': ColorScale | ColorScale[];
849
+ 'marker.opacity': number | number[];
850
+ 'marker.size': number | number[] | number[][];
851
+ 'marker.maxdisplayed': number;
852
+ 'marker.sizeref': number;
853
+ 'marker.sizemax': number;
854
+ 'marker.sizemin': number;
855
+ 'marker.sizemode': 'diameter' | 'area';
856
+ 'marker.showscale': boolean;
857
+ 'marker.line': Partial<ScatterMarkerLine>;
858
+ 'marker.line.color': Color;
859
+ 'marker.line.colorscale': ColorScale | ColorScale[];
860
+ 'marker.colorbar': {};
861
+ 'marker.pad.t': number;
862
+ 'marker.pad.b': number;
863
+ 'marker.pad.l': number;
864
+ 'marker.pad.r': number;
865
+ 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';
866
+ histfunc: 'count' | 'sum' | 'avg' | 'min' | 'max';
867
+ histnorm: '' | 'percent' | 'probability' | 'density' | 'probability density';
868
+ hoveron: 'points' | 'fills';
869
+ hoverinfo: 'all' | 'name' | 'none' | 'skip' | 'text' | 'x' | 'x+text' | 'x+name' | 'x+y' | 'x+y+text' | 'x+y+name' | 'x+y+z' | 'x+y+z+text' | 'x+y+z+name' | 'y' | 'y+name' | 'y+x' | 'y+text' | 'y+x+text' | 'y+x+name' | 'y+z' | 'y+z+text' | 'y+z+name' | 'y+x+z' | 'y+x+z+text' | 'y+x+z+name' | 'z' | 'z+x' | 'z+x+text' | 'z+x+name' | 'z+y+x' | 'z+y+x+text' | 'z+y+x+name' | 'z+x+y' | 'z+x+y+text' | 'z+x+y+name';
870
+ hoverlabel: Partial<HoverLabel>;
871
+ hovertemplate: string | string[];
872
+ hovertext: string | string[];
873
+ hoverongaps: boolean;
874
+ xhoverformat: string;
875
+ yhoverformat: string;
876
+ zhoverformat: string;
877
+ texttemplate: string | string[];
878
+ textinfo: 'label' | 'label+text' | 'label+value' | 'label+percent' | 'label+text+value' | 'label+text+percent' | 'label+value+percent' | 'text' | 'text+value' | 'text+percent' | 'text+value+percent' | 'value' | 'value+percent' | 'percent' | 'none';
879
+ textposition: 'top left' | 'top center' | 'top right' | 'middle left' | 'middle center' | 'middle right' | 'bottom left' | 'bottom center' | 'bottom right' | 'inside' | 'outside' | 'auto' | 'none';
880
+ textfont: Partial<Font>;
881
+ textangle: 'auto' | number;
882
+ insidetextanchor: 'end' | 'middle' | 'start';
883
+ constraintext: 'inside' | 'outside' | 'both' | 'none';
884
+ fill: 'none' | 'tozeroy' | 'tozerox' | 'tonexty' | 'tonextx' | 'toself' | 'tonext';
885
+ fillcolor: string;
886
+ fillpattern: Partial<Pattern>;
887
+ showlegend: boolean;
888
+ legendgroup: string;
889
+ legendgrouptitle: {
890
+ text: string;
891
+ font?: Partial<Font>;
892
+ };
893
+ legendrank: number;
894
+ parents: string[];
895
+ name: string;
896
+ stackgroup: string;
897
+ groupnorm: '' | 'fraction' | 'percent';
898
+ stackgaps: 'infer zero' | 'interpolate';
899
+ connectgaps: boolean;
900
+ visible: boolean | 'legendonly';
901
+ delta: Partial<Delta>;
902
+ gauge: Partial<Gauge>;
903
+ number: Partial<PlotNumber>;
904
+ transforms: DataTransform[];
905
+ orientation: 'v' | 'h';
906
+ width: number | number[];
907
+ boxmean: boolean | 'sd';
908
+ boxpoints: 'all' | 'outliers' | 'suspectedoutliers' | false;
909
+ jitter: number;
910
+ pointpos: number;
911
+ opacity: number;
912
+ showscale: boolean;
913
+ colorscale: ColorScale;
914
+ zsmooth: 'fast' | 'best' | false;
915
+ zmin: number;
916
+ zmax: number;
917
+ ygap: number;
918
+ xgap: number;
919
+ transpose: boolean;
920
+ autobinx: boolean;
921
+ xbins: {
922
+ start: number | string;
923
+ end: number | string;
924
+ size: number | string;
925
+ };
926
+ value: number;
927
+ values: Datum[];
928
+ labels: Datum[];
929
+ direction: 'clockwise' | 'counterclockwise';
930
+ hole: number;
931
+ rotation: number;
932
+ theta: Datum[];
933
+ r: Datum[];
934
+ customdata: Datum[] | Datum[][];
935
+ selectedpoints: Datum[];
936
+ domain: Partial<{
937
+ row: number;
938
+ column: number;
939
+ x: number[];
940
+ y: number[];
941
+ }>;
942
+ title: Partial<DataTitle>;
943
+ branchvalues: 'total' | 'remainder';
944
+ ids: string[];
945
+ level: string;
946
+ cliponaxis: boolean;
947
+ automargin: boolean;
948
+ locationmode: 'ISO-3' | 'USA-states' | 'country names' | 'geojson-id';
949
+ locations: Datum[];
950
+ reversescale: boolean;
951
+ colorbar: Partial<ColorBar>;
952
+ offset: number | number[];
953
+ contours: Partial<{
954
+ coloring: 'fill' | 'heatmap' | 'lines' | 'none';
955
+ end: number;
956
+ labelfont: Partial<Font>;
957
+ labelformat: string;
958
+ operation: '=' | '<' | '>=' | '>' | '<=' | '[]' | '()' | '[)' | '(]' | '][' | ')(' | '](' | ')[';
959
+ showlabels: boolean;
960
+ showlines: boolean;
961
+ size: number;
962
+ start: number;
963
+ type: 'levels' | 'constraint';
964
+ value: number | [lowerBound: number, upperBound: number];
965
+ }>;
966
+ autocontour: boolean;
967
+ ncontours: number;
968
+ uirevision: string | number;
969
+ uid: string;
970
+ }
971
+ /**
972
+ * These interfaces are based on attribute descriptions in
973
+ * https://github.com/plotly/plotly.js/tree/9d6144304308fc3007f0facf2535d38ea3e9b26c/src/transforms
974
+ */
975
+ export interface TransformStyle {
976
+ target: number | string | number[] | string[];
977
+ value: Partial<PlotData>;
978
+ }
979
+ export interface TransformAggregation {
980
+ target: string;
981
+ func?: 'count' | 'sum' | 'avg' | 'median' | 'mode' | 'rms' | 'stddev' | 'min' | 'max' | 'first' | 'last' | undefined;
982
+ funcmode?: 'sample' | 'population' | undefined;
983
+ enabled?: boolean | undefined;
984
+ }
985
+ export interface Transform {
986
+ type: 'aggregate' | 'filter' | 'groupby' | 'sort';
987
+ enabled: boolean;
988
+ target: number | string | number[] | string[];
989
+ operation: string;
990
+ aggregations: TransformAggregation[];
991
+ preservegaps: boolean;
992
+ groups: string | number[] | string[];
993
+ nameformat: string;
994
+ styles: TransformStyle[];
995
+ value: any;
996
+ order: 'ascending' | 'descending';
997
+ }
998
+ export interface ColorBar {
999
+ thicknessmode: 'fraction' | 'pixels';
1000
+ thickness: number;
1001
+ lenmode: 'fraction' | 'pixels';
1002
+ len: number;
1003
+ x: number;
1004
+ xanchor: 'left' | 'center' | 'right';
1005
+ xpad: number;
1006
+ y: number;
1007
+ yanchor: 'top' | 'middle' | 'bottom';
1008
+ ypad: number;
1009
+ outlinecolor: Color;
1010
+ outlinewidth: number;
1011
+ bordercolor: Color;
1012
+ borderwidth: Color;
1013
+ bgcolor: Color;
1014
+ tickmode: 'auto' | 'linear' | 'array';
1015
+ nticks: number;
1016
+ tick0: number | string;
1017
+ dtick: DTickValue;
1018
+ tickvals: Datum[] | Datum[][] | Datum[][][] | TypedArray;
1019
+ ticktext: Datum[] | Datum[][] | Datum[][][] | TypedArray;
1020
+ ticks: 'outside' | 'inside' | '';
1021
+ ticklen: number;
1022
+ tickwidth: number;
1023
+ tickcolor: Color;
1024
+ showticklabels: boolean;
1025
+ tickfont: Font;
1026
+ tickangle: 'auto' | number;
1027
+ tickformat: string;
1028
+ tickformatstops: Array<Partial<TickFormatStop>>;
1029
+ tickprefix: string;
1030
+ showtickprefix: 'all' | 'first' | 'last' | 'none';
1031
+ ticksuffix: string;
1032
+ showticksuffix: 'all' | 'first' | 'last' | 'none';
1033
+ separatethousands: boolean;
1034
+ exponentformat: 'none' | 'e' | 'E' | 'power' | 'SI' | 'B';
1035
+ showexponent: 'all' | 'first' | 'last' | 'none';
1036
+ minexponent: number;
1037
+ title: string;
1038
+ titlefont: Font;
1039
+ titleside: 'right' | 'top' | 'bottom';
1040
+ tickvalssrc: any;
1041
+ ticktextsrc: any;
1042
+ }
1043
+ export type MarkerSymbol = string | number | Array<string | number>;
1044
+ /**
1045
+ * Any combination of "x", "y", "z", "text", "name" joined with a "+" OR "all" or "none" or "skip".
1046
+ * examples: "x", "y", "x+y", "x+y+z", "all"
1047
+ * default: "all"
1048
+ */
1049
+ export interface PlotMarker {
1050
+ symbol: MarkerSymbol;
1051
+ color?: Color | Color[] | undefined;
1052
+ colors?: Color[] | undefined;
1053
+ colorscale?: ColorScale | undefined;
1054
+ cauto?: boolean | undefined;
1055
+ cmax?: number | undefined;
1056
+ cmin?: number | undefined;
1057
+ autocolorscale?: boolean | undefined;
1058
+ reversescale?: boolean | undefined;
1059
+ opacity: number | number[];
1060
+ size: number | number[];
1061
+ maxdisplayed?: number | undefined;
1062
+ sizeref?: number | undefined;
1063
+ sizemax?: number | undefined;
1064
+ sizemin?: number | undefined;
1065
+ sizemode?: 'diameter' | 'area' | undefined;
1066
+ showscale?: boolean | undefined;
1067
+ line: Partial<ScatterMarkerLine>;
1068
+ pad?: Partial<Padding> | undefined;
1069
+ width?: number | undefined;
1070
+ colorbar?: Partial<ColorBar> | undefined;
1071
+ gradient?: {
1072
+ type: 'radial' | 'horizontal' | 'vertical' | 'none';
1073
+ color: Color;
1074
+ typesrc: any;
1075
+ colorsrc: any;
1076
+ } | undefined;
1077
+ pattern?: Partial<Pattern>;
1078
+ }
1079
+ export type ScatterMarker = PlotMarker;
1080
+ export interface ScatterMarkerLine {
1081
+ width: number | number[];
1082
+ color: Color;
1083
+ cauto?: boolean | undefined;
1084
+ cmax?: number | undefined;
1085
+ cmin?: number | undefined;
1086
+ cmid?: number | undefined;
1087
+ colorscale?: ColorScale | undefined;
1088
+ autocolorscale?: boolean | undefined;
1089
+ reversescale?: boolean | undefined;
1090
+ coloraxis?: string | undefined;
1091
+ }
1092
+ export interface ScatterLine {
1093
+ color: Color;
1094
+ width: number;
1095
+ dash: Dash;
1096
+ shape: 'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv';
1097
+ smoothing: number;
1098
+ simplify: boolean;
1099
+ }
1100
+ export interface Font {
1101
+ color: Color;
1102
+ /**
1103
+ * HTML font family - the typeface that will be applied by the web browser.
1104
+ * The web browser will only be able to apply a font if it is available on the system
1105
+ * which it operates. Provide multiple font families, separated by commas, to indicate
1106
+ * the preference in which to apply fonts if they aren't available on the system.
1107
+ * The plotly service (at https://plot.ly or on-premise) generates images on a server,
1108
+ * where only a select number of fonts are installed and supported.
1109
+ * These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*,
1110
+ * *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,
1111
+ * *PT Sans Narrow*, *Raleway*, *Times New Roman*.
1112
+ * @default "Arial, sans-serif"
1113
+ */
1114
+ family: string;
1115
+ /**
1116
+ * Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
1117
+ * @default "none"
1118
+ */
1119
+ shadow: string;
1120
+ /**
1121
+ * number greater than or equal to 1
1122
+ * @default 13
1123
+ */
1124
+ size: number;
1125
+ /**
1126
+ * Sets the weight (or boldness) of the font.
1127
+ * number between or equal to 1 and 1000
1128
+ * @default normal
1129
+ */
1130
+ weight: number;
1131
+ }
1132
+ export interface Config {
1133
+ /**
1134
+ * Determines whether math should be typeset or not,
1135
+ * when MathJax (either v2 or v3) is present on the page.
1136
+ */
1137
+ typesetMath: boolean;
1138
+ /** DO autosize once regardless of layout.autosize (use default width or height values otherwise) */
1139
+ autosizable: boolean;
1140
+ /** set the length of the undo/redo queue */
1141
+ queueLength: number;
1142
+ /** if we DO autosize, do we fill the container or the screen? */
1143
+ fillFrame: boolean;
1144
+ /** if we DO autosize, set the frame margins in percents of plot size */
1145
+ frameMargins: number;
1146
+ /** Set global transform to be applied to all traces with no specification needed */
1147
+ globalTransforms: any[];
1148
+ /** Which localization should we use? Should be a string like 'en' or 'en-US' */
1149
+ locale: string;
1150
+ /**
1151
+ * Localization definitions
1152
+ * Locales can be provided either here (specific to one chart) or globally
1153
+ * by registering them as modules.
1154
+ * Should be an object of objects {locale: {dictionary: {...}, format: {...}}}
1155
+ * {
1156
+ * da: {
1157
+ * dictionary: {'Reset axes': 'Nulstil aksler', ...},
1158
+ * format: {months: [...], shortMonths: [...]}
1159
+ * },
1160
+ * ...
1161
+ * }
1162
+ * All parts are optional. When looking for translation or format fields, we
1163
+ * look first for an exact match in a config locale, then in a registered
1164
+ * module. If those fail, we strip off any regionalization ('en-US' -> 'en')
1165
+ * and try each (config, registry) again. The final fallback for translation
1166
+ * is untranslated (which is US English) and for formats is the base English
1167
+ * (the only consequence being the last fallback date format %x is DD/MM/YYYY
1168
+ * instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored
1169
+ * for our automatic number formatting, but can be used in custom formats.
1170
+ */
1171
+ locales: {};
1172
+ /** Make the chart responsive to window size */
1173
+ responsive: boolean;
1174
+ }
1175
+ export interface RangeSlider {
1176
+ visible: boolean;
1177
+ thickness: number;
1178
+ range: [Datum, Datum];
1179
+ borderwidth: number;
1180
+ bordercolor: string;
1181
+ bgcolor: string;
1182
+ }
1183
+ export interface RangeSelectorButton {
1184
+ step: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'all';
1185
+ stepmode: 'backward' | 'todate';
1186
+ count: number;
1187
+ label: string;
1188
+ }
1189
+ export interface RangeSelector extends Label {
1190
+ buttons: Array<Partial<RangeSelectorButton>>;
1191
+ visible: boolean;
1192
+ x: number;
1193
+ xanchor: 'auto' | 'left' | 'center' | 'right';
1194
+ y: number;
1195
+ yanchor: 'auto' | 'top' | 'middle' | 'bottom';
1196
+ activecolor: string;
1197
+ borderwidth: number;
1198
+ }
1199
+ export interface Label {
1200
+ /** Sets the background color of all hover labels on graph. */
1201
+ bgcolor: string;
1202
+ /** Sets the border color of all hover labels on graph. */
1203
+ bordercolor: string;
1204
+ /** Sets the default hover label font used by all traces on the graph. */
1205
+ font: Partial<Font>;
1206
+ }
1207
+ export interface LegendTitle {
1208
+ font: Partial<Font>;
1209
+ side: 'top' | 'left' | 'top left' | 'top center' | 'top right';
1210
+ text: string;
1211
+ }
1212
+ export interface HoverLabel extends Label {
1213
+ /**
1214
+ * Sets the horizontal alignment of the text content within hover label box.
1215
+ * @default "auto"
1216
+ */
1217
+ align: 'left' | 'right' | 'auto';
1218
+ /**
1219
+ * Sets the default length (in number of characters) of the trace name
1220
+ * in the hover labels for all traces.
1221
+ * -1 shows the whole name regardless of length.
1222
+ * @default 15
1223
+ */
1224
+ namelength: number;
1225
+ }
1226
+ export interface Annotations extends Label {
1227
+ /** Determines whether or not this annotation is visible. */
1228
+ visible: boolean;
1229
+ /**
1230
+ * Sets the text associated with this annotation.
1231
+ * Plotly uses a subset of HTML tags to do things like
1232
+ * newline (<br>), bold (<b></b>), italics (<i></i>),
1233
+ * hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>
1234
+ * <span> are also supported.
1235
+ */
1236
+ text: string;
1237
+ /** Sets the angle at which the `text` is drawn with respect to the horizontal. */
1238
+ textangle: string;
1239
+ /**
1240
+ * Sets an explicit width for the text box. null (default) lets the
1241
+ * text set the box width. Wider text will be clipped.
1242
+ * There is no automatic wrapping; use <br> to start a new line.
1243
+ */
1244
+ width: number;
1245
+ /**
1246
+ * Sets an explicit height for the text box. null (default) lets the
1247
+ * text set the box height. Taller text will be clipped.
1248
+ */
1249
+ height: number;
1250
+ /** Sets the opacity of the annotation (text + arrow). */
1251
+ opacity: number;
1252
+ /**
1253
+ * Sets the horizontal alignment of the `text` within the box.
1254
+ * Has an effect only if `text` spans more two or more lines
1255
+ * (i.e. `text` contains one or more <br> HTML tags) or if an
1256
+ * explicit width is set to override the text width.
1257
+ */
1258
+ align: 'left' | 'center' | 'right';
1259
+ /**
1260
+ * Sets the vertical alignment of the `text` within the box.
1261
+ * Has an effect only if an explicit height is set to override the text height.
1262
+ */
1263
+ valign: 'top' | 'middle' | 'bottom';
1264
+ /** Sets the padding (in px) between the `text` and the enclosing border. */
1265
+ borderpad: number;
1266
+ /** Sets the width (in px) of the border enclosing the annotation `text`. */
1267
+ borderwidth: number;
1268
+ /**
1269
+ * Determines whether or not the annotation is drawn with an arrow.
1270
+ * If *true*, `text` is placed near the arrow's tail.
1271
+ * If *false*, `text` lines up with the `x` and `y` provided.
1272
+ */
1273
+ showarrow: boolean;
1274
+ /** Sets the color of the annotation arrow. */
1275
+ arrowcolor: string;
1276
+ /** Sets the end annotation arrow head style. */
1277
+ arrowhead: number;
1278
+ /** Sets the start annotation arrow head style. */
1279
+ startarrowhead: number;
1280
+ /** Sets the annotation arrow head position. */
1281
+ arrowside: 'end' | 'start';
1282
+ /**
1283
+ * Sets the size of the end annotation arrow head, relative to `arrowwidth`.
1284
+ * A value of 1 (default) gives a head about 3x as wide as the line.
1285
+ */
1286
+ arrowsize: number;
1287
+ /**
1288
+ * Sets the size of the start annotation arrow head, relative to `arrowwidth`.
1289
+ * A value of 1 (default) gives a head about 3x as wide as the line.
1290
+ */
1291
+ startarrowsize: number;
1292
+ /** Sets the width (in px) of annotation arrow line. */
1293
+ arrowwidth: number;
1294
+ /**
1295
+ * Sets a distance, in pixels, to move the end arrowhead away from the
1296
+ * position it is pointing at, for example to point at the edge of
1297
+ * a marker independent of zoom. Note that this shortens the arrow
1298
+ * from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`
1299
+ * which moves everything by this amount.
1300
+ */
1301
+ standoff: number;
1302
+ /**
1303
+ * Sets a distance, in pixels, to move the start arrowhead away from the
1304
+ * position it is pointing at, for example to point at the edge of
1305
+ * a marker independent of zoom. Note that this shortens the arrow
1306
+ * from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`
1307
+ * which moves everything by this amount.
1308
+ */
1309
+ startstandoff: number;
1310
+ /**
1311
+ * Sets the x component of the arrow tail about the arrow head.
1312
+ * If `axref` is `pixel`, a positive (negative)
1313
+ * component corresponds to an arrow pointing
1314
+ * from right to left (left to right).
1315
+ * If `axref` is an axis, this is an absolute value on that axis,
1316
+ * like `x`, NOT a relative value.
1317
+ */
1318
+ ax: number;
1319
+ /**
1320
+ * Sets the y component of the arrow tail about the arrow head.
1321
+ * If `ayref` is `pixel`, a positive (negative)
1322
+ * component corresponds to an arrow pointing
1323
+ * from bottom to top (top to bottom).
1324
+ * If `ayref` is an axis, this is an absolute value on that axis,
1325
+ * like `y`, NOT a relative value.
1326
+ */
1327
+ ay: number;
1328
+ /**
1329
+ * Indicates in what terms the tail of the annotation (ax,ay)
1330
+ * is specified. If `pixel`, `ax` is a relative offset in pixels
1331
+ * from `x`. If set to an x axis id (e.g. *x* or *x2*), `ax` is
1332
+ * specified in the same terms as that axis. This is useful
1333
+ * for trendline annotations which should continue to indicate
1334
+ * the correct trend when zoomed.
1335
+ */
1336
+ axref: 'pixel' | XAxisName;
1337
+ /**
1338
+ * Indicates in what terms the tail of the annotation (ax,ay)
1339
+ * is specified. If `pixel`, `ay` is a relative offset in pixels
1340
+ * from `y`. If set to a y axis id (e.g. *y* or *y2*), `ay` is
1341
+ * specified in the same terms as that axis. This is useful
1342
+ * for trendline annotations which should continue to indicate
1343
+ * the correct trend when zoomed.
1344
+ */
1345
+ ayref: 'pixel' | YAxisName;
1346
+ /**
1347
+ * Sets the annotation's x coordinate axis.
1348
+ * If set to an x axis id (e.g. *x* or *x2*), the `x` position refers to an x coordinate
1349
+ * If set to *paper*, the `x` position refers to the distance from
1350
+ * the left side of the plotting area in normalized coordinates
1351
+ * where 0 (1) corresponds to the left (right) side.
1352
+ */
1353
+ xref: 'paper' | XAxisName;
1354
+ /**
1355
+ * Sets the annotation's x position.
1356
+ * If the axis `type` is *log*, then you must take the log of your desired range.
1357
+ * If the axis `type` is *date*, it should be date strings, like date data,
1358
+ * though Date objects and unix milliseconds will be accepted and converted to strings.
1359
+ * If the axis `type` is *category*, it should be numbers, using the scale where each
1360
+ * category is assigned a serial number from zero in the order it appears.
1361
+ */
1362
+ x: number | string;
1363
+ /**
1364
+ * Sets the text box's horizontal position anchor
1365
+ * This anchor binds the `x` position to the *left*, *center* or *right* of the annotation.
1366
+ * For example, if `x` is set to 1, `xref` to *paper* and `xanchor` to *right* then the
1367
+ * right-most portion of the annotation lines up with the right-most edge of the plotting area.
1368
+ * If *auto*, the anchor is equivalent to *center* for data-referenced annotations or if there
1369
+ * is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side.
1370
+ */
1371
+ xanchor: 'auto' | 'left' | 'center' | 'right';
1372
+ /**
1373
+ * Shifts the position of the whole annotation and arrow to the
1374
+ * right (positive) or left (negative) by this many pixels.
1375
+ */
1376
+ xshift: number;
1377
+ /**
1378
+ * Sets the annotation's y coordinate axis.
1379
+ * If set to an y axis id (e.g. *y* or *y2*), the `y` position refers to an y coordinate
1380
+ * If set to *paper*, the `y` position refers to the distance from
1381
+ * the bottom of the plotting area in normalized coordinates
1382
+ * where 0 (1) corresponds to the bottom (top).
1383
+ */
1384
+ yref: 'paper' | YAxisName;
1385
+ /**
1386
+ * Sets the annotation's y position.
1387
+ * If the axis `type` is *log*, then you must take the log of your desired range.
1388
+ * If the axis `type` is *date*, it should be date strings, like date data,
1389
+ * though Date objects and unix milliseconds will be accepted and converted to strings.
1390
+ * If the axis `type` is *category*, it should be numbers, using the scale where each
1391
+ * category is assigned a serial number from zero in the order it appears.
1392
+ */
1393
+ y: number | string;
1394
+ /**
1395
+ * Sets the text box's vertical position anchor
1396
+ * This anchor binds the `y` position to the *top*, *middle* or *bottom* of the annotation.
1397
+ * For example, if `y` is set to 1, `yref` to *paper* and `yanchor` to *top* then the
1398
+ * top-most portion of the annotation lines up with the top-most edge of the plotting area.
1399
+ * If *auto*, the anchor is equivalent to *middle* for data-referenced annotations or if
1400
+ * there is an arrow, whereas for paper-referenced with no arrow, the anchor picked
1401
+ * corresponds to the closest side.
1402
+ */
1403
+ yanchor: 'auto' | 'top' | 'middle' | 'bottom';
1404
+ /**
1405
+ * Shifts the position of the whole annotation and arrow up
1406
+ * (positive) or down (negative) by this many pixels.
1407
+ */
1408
+ yshift: number;
1409
+ /**
1410
+ * Makes this annotation respond to clicks on the plot.
1411
+ * If you click a data point that exactly matches the `x` and `y` values of this annotation,
1412
+ * and it is hidden (visible: false), it will appear. In *onoff* mode, you must click the same
1413
+ * point again to make it disappear, so if you click multiple points, you can show multiple
1414
+ * annotations. In *onout* mode, a click anywhere else in the plot (on another data point or not)
1415
+ * will hide this annotation. If you need to show/hide this annotation in response to different
1416
+ * `x` or `y` values, you can set `xclick` and/or `yclick`. This is useful for example to label
1417
+ * the side of a bar. To label markers though, `standoff` is preferred over `xclick` and `yclick`.
1418
+ */
1419
+ clicktoshow: false | 'onoff' | 'onout';
1420
+ /**
1421
+ * Toggle this annotation when clicking a data point whose `x` value
1422
+ * is `xclick` rather than the annotation's `x` value.
1423
+ */
1424
+ xclick: any;
1425
+ /**
1426
+ * Toggle this annotation when clicking a data point whose `y` value
1427
+ * is `yclick` rather than the annotation's `y` value.
1428
+ */
1429
+ yclick: any;
1430
+ /**
1431
+ * Sets text to appear when hovering over this annotation.
1432
+ * If omitted or blank, no hover label will appear.
1433
+ */
1434
+ hovertext: string;
1435
+ hoverlabel: Partial<HoverLabel>;
1436
+ /**
1437
+ * Determines whether the annotation text box captures mouse move and click events,
1438
+ * or allows those events to pass through to data points in the plot that may be
1439
+ * behind the annotation. By default `captureevents` is *false* unless `hovertext`
1440
+ * is provided. If you use the event `plotly_clickannotation` without `hovertext`
1441
+ * you must explicitly enable `captureevents`.
1442
+ */
1443
+ captureevents: boolean;
1444
+ }
1445
+ export interface Domain {
1446
+ x: number[];
1447
+ y: number[];
1448
+ row: number;
1449
+ column: number;
1450
+ }
1451
+ export interface Padding {
1452
+ /**
1453
+ * The amount of padding (in px) along the top of the component.
1454
+ */
1455
+ t: number;
1456
+ /**
1457
+ * The amount of padding (in px) on the right side of the component.
1458
+ */
1459
+ r: number;
1460
+ /**
1461
+ * The amount of padding (in px) along the bottom of the component.
1462
+ */
1463
+ b: number;
1464
+ /**
1465
+ * The amount of padding (in px) on the left side of the component.
1466
+ */
1467
+ l: number;
1468
+ editType: 'arraydraw';
1469
+ }
1470
+ /**
1471
+ * 'Sets the pattern within the marker.
1472
+ */
1473
+ export interface Pattern {
1474
+ /**
1475
+ * Sets the shape of the pattern fill.
1476
+ * By default, no pattern is used for filling the area.
1477
+ */
1478
+ shape?: '' | '/' | '\\' | 'x' | '-' | '|' | '+' | '.';
1479
+ /**
1480
+ * Determines whether `marker.color` should be used
1481
+ * as a default to `bgcolor` or a `fgcolor`.
1482
+ */
1483
+ fillmode?: 'replace' | 'overlay';
1484
+ /**
1485
+ * When there is no colorscale sets the color of background pattern fill.
1486
+ * Defaults to a `marker.color` background when `fillmode` is *overlay*.
1487
+ * Otherwise, defaults to a transparent background.
1488
+ */
1489
+ bgcolor?: string;
1490
+ /**
1491
+ * When there is no colorscale sets the color of foreground pattern fill.
1492
+ * Defaults to a `marker.color` background when `fillmode` is *replace*.
1493
+ * Otherwise, defaults to dark grey or white
1494
+ * to increase contrast with the `bgcolor`.
1495
+ */
1496
+ fgcolor?: string;
1497
+ /**
1498
+ * Sets the opacity of the foreground pattern fill.
1499
+ * Defaults to a 0.5 when `fillmode` is *overlay*.
1500
+ * Otherwise, defaults to 1.
1501
+ */
1502
+ fgopacity?: string;
1503
+ /**
1504
+ * Sets the size of unit squares of the pattern fill in pixels,
1505
+ * which corresponds to the interval of repetition of the pattern.
1506
+ */
1507
+ size?: number;
1508
+ /**
1509
+ * Sets the solidity of the pattern fill.
1510
+ * Solidity is roughly the fraction of the area filled by the pattern.
1511
+ * Solidity of 0 shows only the background color without pattern
1512
+ * and solidty of 1 shows only the foreground color without pattern.
1513
+ */
1514
+ solidity?: number;
1515
+ }
1516
+ export {};