@deephaven/chart 0.15.5-vite.12 → 0.15.5
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.
- package/dist/Chart.d.ts +90 -84
- package/dist/Chart.d.ts.map +1 -1
- package/dist/Chart.js +50 -47
- package/dist/Chart.js.map +1 -1
- package/dist/ChartModel.d.ts +26 -19
- package/dist/ChartModel.d.ts.map +1 -1
- package/dist/ChartModel.js +15 -6
- package/dist/ChartModel.js.map +1 -1
- package/dist/ChartModelFactory.d.ts +72 -43
- package/dist/ChartModelFactory.d.ts.map +1 -1
- package/dist/ChartModelFactory.js +27 -27
- package/dist/ChartModelFactory.js.map +1 -1
- package/dist/ChartTestUtils.js.map +1 -1
- package/dist/ChartTheme.d.ts +17 -17
- package/dist/ChartTheme.d.ts.map +1 -1
- package/dist/ChartTheme.js.map +1 -1
- package/dist/ChartUtils.d.ts +4 -4
- package/dist/ChartUtils.d.ts.map +1 -1
- package/dist/ChartUtils.js +3 -0
- package/dist/ChartUtils.js.map +1 -1
- package/dist/FigureChartModel.js.map +1 -1
- package/dist/MockChartModel.d.ts +8 -8
- package/dist/MockChartModel.js.map +1 -1
- package/dist/declaration.d.js +2 -0
- package/dist/declaration.d.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/isFigureChartModel.d.ts +4 -0
- package/dist/isFigureChartModel.d.ts.map +1 -0
- package/dist/isFigureChartModel.js +4 -0
- package/dist/isFigureChartModel.js.map +1 -0
- package/dist/plotly/Plot.js.map +1 -1
- package/dist/plotly/Plotly.d.ts +1 -0
- package/dist/plotly/Plotly.js.map +1 -1
- package/package.json +12 -8
package/dist/ChartModel.js
CHANGED
|
@@ -11,11 +11,18 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11
11
|
*/
|
|
12
12
|
class ChartModel {
|
|
13
13
|
constructor() {
|
|
14
|
+
_defineProperty(this, "listeners", void 0);
|
|
15
|
+
|
|
16
|
+
_defineProperty(this, "formatter", void 0);
|
|
17
|
+
|
|
18
|
+
_defineProperty(this, "rect", void 0);
|
|
19
|
+
|
|
20
|
+
_defineProperty(this, "isDownsamplingDisabled", void 0);
|
|
21
|
+
|
|
22
|
+
_defineProperty(this, "title", void 0);
|
|
23
|
+
|
|
14
24
|
this.listeners = [];
|
|
15
|
-
this.formatter = null;
|
|
16
|
-
this.rect = null;
|
|
17
25
|
this.isDownsamplingDisabled = false;
|
|
18
|
-
this.title = null;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
getData() {
|
|
@@ -36,18 +43,20 @@ class ChartModel {
|
|
|
36
43
|
|
|
37
44
|
isFilterRequired() {
|
|
38
45
|
return false;
|
|
39
|
-
}
|
|
46
|
+
} // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
47
|
+
|
|
40
48
|
|
|
41
|
-
setFilter() {}
|
|
49
|
+
setFilter(filter) {}
|
|
42
50
|
/**
|
|
43
51
|
* Close this model, clean up any underlying subscriptions
|
|
44
52
|
*/
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
45
54
|
|
|
46
55
|
|
|
47
56
|
close() {}
|
|
48
57
|
/**
|
|
49
58
|
* Set the formatter to use when charting the data.
|
|
50
|
-
* @param
|
|
59
|
+
* @param formatter The formatter to use to format the charting data
|
|
51
60
|
*/
|
|
52
61
|
|
|
53
62
|
|
package/dist/ChartModel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/ChartModel.ts"],"names":["ChartModel","constructor","listeners","isDownsamplingDisabled","getData","getDefaultTitle","getLayout","getFilterColumnMap","Map","isFilterRequired","setFilter","filter","close","setFormatter","formatter","setDownsamplingDisabled","setDimensions","rect","setTitle","title","subscribe","callback","push","unsubscribe","listener","fireEvent","event","i","length","fireUpdate","data","CustomEvent","EVENT_UPDATED","detail","fireDisconnect","EVENT_DISCONNECT","fireReconnect","EVENT_RECONNECT","fireDownsampleStart","EVENT_DOWNSAMPLESTARTED","fireDownsampleFinish","EVENT_DOWNSAMPLEFINISHED","fireDownsampleFail","EVENT_DOWNSAMPLEFAILED","fireDownsampleNeeded","EVENT_DOWNSAMPLENEEDED","fireLoadFinished","EVENT_LOADFINISHED"],"mappings":";;AAAA;;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA,MAAMA,UAAN,CAAiB;AAiBfC,EAAAA,WAAW,GAAG;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AACZ,SAAKC,SAAL,GAAiB,EAAjB;AACA,SAAKC,sBAAL,GAA8B,KAA9B;AACD;;AAYDC,EAAAA,OAAO,GAAwC;AAC7C,WAAO,EAAP;AACD;;AAEDC,EAAAA,eAAe,GAAW;AACxB,WAAO,EAAP;AACD;;AAEDC,EAAAA,SAAS,GAA4B;AACnC,WAAO,EAAP;AACD;;AAEDC,EAAAA,kBAAkB,GAAwB;AACxC,WAAO,IAAIC,GAAJ,EAAP;AACD;;AAEDC,EAAAA,gBAAgB,GAAY;AAC1B,WAAO,KAAP;AACD,GAlDc,CAoDf;;;AACAC,EAAAA,SAAS,CAACC,MAAD,EAAoC,CAAE;AAE/C;AACF;AACA;AACE;;;AACAC,EAAAA,KAAK,GAAS,CAAE;AAEhB;AACF;AACA;AACA;;;AACEC,EAAAA,YAAY,CAACC,SAAD,EAA6B;AACvC,SAAKA,SAAL,GAAiBA,SAAjB;AACD;AAED;AACF;AACA;AACA;;;AACEC,EAAAA,uBAAuB,CAACZ,sBAAD,EAAwC;AAC7D,SAAKA,sBAAL,GAA8BA,sBAA9B;AACD;AAED;AACF;AACA;AACA;;;AACEa,EAAAA,aAAa,CAACC,IAAD,EAAsB;AACjC,SAAKA,IAAL,GAAYA,IAAZ;AACD;;AAEDC,EAAAA,QAAQ,CAACC,KAAD,EAAsB;AAC5B,SAAKA,KAAL,GAAaA,KAAb;AACD;AAED;AACF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C,SAAKR,SAAL,CACE,IAAIM,WAAJ,CAAgB/B,UAAU,CAAC2C,sBAA3B,EAAmD;AAAEV,MAAAA;AAAF,KAAnD,CADF;AAGD;;AAEDW,EAAAA,oBAAoB,CAACX,MAAD,EAAwB;AAC1C,SAAKR,SAAL,CACE,IAAIM,WAAJ,CAAgB/B,UAAU,CAAC6C,sBAA3B,EAAmD;AAAEZ,MAAAA;AAAF,KAAnD,CADF;AAGD;;AAEDa,EAAAA,gBAAgB,GAAS;AACvB,SAAKrB,SAAL,CAAe,IAAIM,WAAJ,CAAgB/B,UAAU,CAAC+C,kBAA3B,CAAf;AACD;;AAjJc;;gBAAX/C,U,mBACmB,0B;;gBADnBA,U,sBAGsB,6B;;gBAHtBA,U,qBAKqB,4B;;gBALrBA,U,6BAO6B,oC;;gBAP7BA,U,8BAS8B,qC;;gBAT9BA,U,4BAW4B,mC;;gBAX5BA,U,4BAa4B,mC;;gBAb5BA,U,wBAewB,+B;;AAqI9B,eAAeA,UAAf","sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n\nimport { Column } from '@deephaven/jsapi-shim';\nimport { Formatter } from '@deephaven/jsapi-utils';\n\ntype ChartEvent = CustomEvent;\n/**\n * Model for a Chart\n * All of these methods should return very quickly.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the chart to refresh.\n */\nclass ChartModel {\n static EVENT_UPDATED = 'ChartModel.EVENT_UPDATED';\n\n static EVENT_DISCONNECT = 'ChartModel.EVENT_DISCONNECT';\n\n static EVENT_RECONNECT = 'ChartModel.EVENT_RECONNECT';\n\n static EVENT_DOWNSAMPLESTARTED = 'ChartModel.EVENT_DOWNSAMPLESTARTED';\n\n static EVENT_DOWNSAMPLEFINISHED = 'ChartModel.EVENT_DOWNSAMPLEFINISHED';\n\n static EVENT_DOWNSAMPLEFAILED = 'ChartModel.EVENT_DOWNSAMPLEFAILED';\n\n static EVENT_DOWNSAMPLENEEDED = 'ChartModel.EVENT_DOWNSAMPLENEEDED';\n\n static EVENT_LOADFINISHED = 'ChartModel.EVENT_LOADFINISHED';\n\n constructor() {\n this.listeners = [];\n this.isDownsamplingDisabled = false;\n }\n\n listeners: ((event: ChartEvent) => void)[];\n\n formatter?: Formatter;\n\n rect?: DOMRect;\n\n isDownsamplingDisabled: boolean;\n\n title?: string;\n\n getData(): { name: string; visible: string }[] {\n return [];\n }\n\n getDefaultTitle(): string {\n return '';\n }\n\n getLayout(): Record<string, unknown> {\n return {};\n }\n\n getFilterColumnMap(): Map<string, Column> {\n return new Map();\n }\n\n isFilterRequired(): boolean {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setFilter(filter: Map<string, string>): void {}\n\n /**\n * Close this model, clean up any underlying subscriptions\n */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n close(): void {}\n\n /**\n * Set the formatter to use when charting the data.\n * @param formatter The formatter to use to format the charting data\n */\n setFormatter(formatter: Formatter): void {\n this.formatter = formatter;\n }\n\n /**\n * Disable downsampling\n * @param {boolean} isDownsamplingDisabled True if downsampling should be disabled\n */\n setDownsamplingDisabled(isDownsamplingDisabled: boolean): void {\n this.isDownsamplingDisabled = isDownsamplingDisabled;\n }\n\n /**\n * Set the dimensions of the plot. May be needed to evaluate some of the percents\n * @param {DOMRect} rect The bounding rectangle of the plot\n */\n setDimensions(rect: DOMRect): void {\n this.rect = rect;\n }\n\n setTitle(title: string): void {\n this.title = title;\n }\n\n /**\n * Subscribe to this ChartModel and start listening for all events.\n * @param {Function<Event>} callback Callback when an event occurs\n */\n subscribe(callback: (event: ChartEvent) => void): void {\n this.listeners.push(callback);\n }\n\n unsubscribe(callback: (event: ChartEvent) => void): void {\n this.listeners = this.listeners.filter(listener => listener !== callback);\n }\n\n fireEvent(event: ChartEvent): void {\n for (let i = 0; i < this.listeners.length; i += 1) {\n this.listeners[i](event);\n }\n }\n\n fireUpdate(data: unknown): void {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_UPDATED, { detail: data }));\n }\n\n fireDisconnect(): void {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DISCONNECT));\n }\n\n fireReconnect(): void {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_RECONNECT));\n }\n\n fireDownsampleStart(detail: unknown): void {\n this.fireEvent(\n new CustomEvent(ChartModel.EVENT_DOWNSAMPLESTARTED, { detail })\n );\n }\n\n fireDownsampleFinish(detail: unknown): void {\n this.fireEvent(\n new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFINISHED, { detail })\n );\n }\n\n fireDownsampleFail(detail: unknown): void {\n this.fireEvent(\n new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFAILED, { detail })\n );\n }\n\n fireDownsampleNeeded(detail: unknown): void {\n this.fireEvent(\n new CustomEvent(ChartModel.EVENT_DOWNSAMPLENEEDED, { detail })\n );\n }\n\n fireLoadFinished(): void {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_LOADFINISHED));\n }\n}\n\nexport default ChartModel;\n"],"file":"ChartModel.js"}
|
|
@@ -1,62 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
import { Figure, SeriesPlotStyle, Table } from '@deephaven/jsapi-shim';
|
|
2
|
+
import ChartModel from './ChartModel';
|
|
3
|
+
interface ChartModelSettings {
|
|
4
|
+
title: string;
|
|
5
|
+
xAxis: string;
|
|
6
|
+
series: string[];
|
|
7
|
+
type: SeriesPlotStyle;
|
|
8
|
+
}
|
|
2
9
|
declare class ChartModelFactory {
|
|
3
10
|
/**
|
|
4
11
|
* Creates a model from the settings provided.
|
|
5
12
|
* Tries to create a Figure in the API with it.
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @returns
|
|
13
|
+
* @param settings The chart builder settings
|
|
14
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
15
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
16
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
17
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
18
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
19
|
+
* @param table The table to build the model for
|
|
20
|
+
* @param theme The theme for the figure. Defaults to ChartTheme
|
|
21
|
+
* @returns The ChartModel Promise representing the figure
|
|
15
22
|
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
16
23
|
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
17
24
|
*/
|
|
18
|
-
static makeModelFromSettings(settings: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
static makeModelFromSettings(settings: ChartModelSettings, table: Table, theme?: Readonly<{
|
|
26
|
+
paper_bgcolor: string;
|
|
27
|
+
plot_bgcolor: string;
|
|
28
|
+
title_color: string;
|
|
29
|
+
colorway: string;
|
|
30
|
+
gridcolor: string;
|
|
31
|
+
linecolor: string;
|
|
32
|
+
zerolinecolor: string;
|
|
33
|
+
activecolor: string;
|
|
34
|
+
rangebgcolor: string;
|
|
35
|
+
area_color: string;
|
|
36
|
+
trend_color: string;
|
|
37
|
+
line_color: string;
|
|
38
|
+
error_band_line_color: string;
|
|
39
|
+
error_band_fill_color: string;
|
|
40
|
+
ohlc_increasing: string;
|
|
41
|
+
ohlc_decreasing: string;
|
|
42
|
+
}>): Promise<ChartModel>;
|
|
25
43
|
/**
|
|
26
44
|
* Creates a model from the settings provided.
|
|
27
45
|
* Tries to create a Figure in the API with it.
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @returns
|
|
46
|
+
* @param settings The chart builder settings
|
|
47
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
48
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
49
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
50
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
51
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
52
|
+
* @param table The table to build the model for
|
|
53
|
+
* @returns The Figure created with the settings provided
|
|
36
54
|
*/
|
|
37
|
-
static makeFigureFromSettings(settings:
|
|
38
|
-
isLinked: boolean;
|
|
39
|
-
series: string[];
|
|
40
|
-
type: string;
|
|
41
|
-
xAxis: string;
|
|
42
|
-
hiddenSeries?: string[] | undefined;
|
|
43
|
-
}, table: dh.Table): Promise<dh.plot.Figure>;
|
|
55
|
+
static makeFigureFromSettings(settings: ChartModelSettings, table: Table): Promise<Figure>;
|
|
44
56
|
/**
|
|
45
57
|
* Creates a model from the settings provided.
|
|
46
58
|
* Tries to create a Figure in the API with it.
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
* @returns
|
|
59
|
+
* @param settings The chart builder settings
|
|
60
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
61
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
62
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
63
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
64
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
65
|
+
* @param figure The figure to build the model for
|
|
66
|
+
* @param theme The theme for the figure. Defaults to ChartTheme
|
|
67
|
+
* @returns The FigureChartModel representing the figure
|
|
56
68
|
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
57
69
|
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
58
70
|
*/
|
|
59
|
-
static makeModel(settings:
|
|
71
|
+
static makeModel(settings: Record<string, unknown> | undefined, figure: Figure, theme?: Readonly<{
|
|
72
|
+
paper_bgcolor: string;
|
|
73
|
+
plot_bgcolor: string;
|
|
74
|
+
title_color: string;
|
|
75
|
+
colorway: string;
|
|
76
|
+
gridcolor: string;
|
|
77
|
+
linecolor: string;
|
|
78
|
+
zerolinecolor: string;
|
|
79
|
+
activecolor: string;
|
|
80
|
+
rangebgcolor: string;
|
|
81
|
+
area_color: string;
|
|
82
|
+
trend_color: string;
|
|
83
|
+
line_color: string;
|
|
84
|
+
error_band_line_color: string;
|
|
85
|
+
error_band_fill_color: string;
|
|
86
|
+
ohlc_increasing: string;
|
|
87
|
+
ohlc_decreasing: string;
|
|
88
|
+
}>): Promise<ChartModel>;
|
|
60
89
|
}
|
|
61
|
-
|
|
90
|
+
export default ChartModelFactory;
|
|
62
91
|
//# sourceMappingURL=ChartModelFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartModelFactory.d.ts","sourceRoot":"","sources":["../src/ChartModelFactory.
|
|
1
|
+
{"version":3,"file":"ChartModelFactory.d.ts","sourceRoot":"","sources":["../src/ChartModelFactory.ts"],"names":[],"mappings":"AAAA,OAAW,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI3E,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,cAAM,iBAAiB;IACrB;;;;;;;;;;;;;;OAcG;WACU,qBAAqB,CAChC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,KAAK,EACZ,KAAK;;;;;;;;;;;;;;;;;MAAa,GACjB,OAAO,CAAC,UAAU,CAAC;IAQtB;;;;;;;;;;;OAWG;WACU,sBAAsB,CACjC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,MAAM,CAAC;IAelB;;;;;;;;;;;;;;OAcG;WACU,SAAS,CACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,MAAM,EAAE,MAAM,EACd,KAAK;;;;;;;;;;;;;;;;;MAAa,GACjB,OAAO,CAAC,UAAU,CAAC;CAGvB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -11,15 +11,15 @@ class ChartModelFactory {
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates a model from the settings provided.
|
|
13
13
|
* Tries to create a Figure in the API with it.
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @returns
|
|
14
|
+
* @param settings The chart builder settings
|
|
15
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
16
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
17
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
18
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
19
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
20
|
+
* @param table The table to build the model for
|
|
21
|
+
* @param theme The theme for the figure. Defaults to ChartTheme
|
|
22
|
+
* @returns The ChartModel Promise representing the figure
|
|
23
23
|
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
24
24
|
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
25
25
|
*/
|
|
@@ -34,21 +34,21 @@ class ChartModelFactory {
|
|
|
34
34
|
/**
|
|
35
35
|
* Creates a model from the settings provided.
|
|
36
36
|
* Tries to create a Figure in the API with it.
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @returns
|
|
37
|
+
* @param settings The chart builder settings
|
|
38
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
39
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
40
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
41
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
42
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
43
|
+
* @param table The table to build the model for
|
|
44
|
+
* @returns The Figure created with the settings provided
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
static makeFigureFromSettings(settings, table) {
|
|
49
49
|
return _asyncToGenerator(function* () {
|
|
50
50
|
// Copy the table first and then re-apply the filters from the original table
|
|
51
|
-
// When we add
|
|
51
|
+
// When we add toable linking we'll want to listen to the original table and update
|
|
52
52
|
// the copied table with any changes that occur.
|
|
53
53
|
// The table gets owned by the Figure that gets created, which closes the table
|
|
54
54
|
var tableCopy = yield table.copy();
|
|
@@ -61,15 +61,15 @@ class ChartModelFactory {
|
|
|
61
61
|
/**
|
|
62
62
|
* Creates a model from the settings provided.
|
|
63
63
|
* Tries to create a Figure in the API with it.
|
|
64
|
-
* @param
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @returns
|
|
64
|
+
* @param settings The chart builder settings
|
|
65
|
+
* @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated
|
|
66
|
+
* @param settings.series The column names to use for creating the series of this chart
|
|
67
|
+
* @param settings.type Chart builder type, from ChartBuilder.types
|
|
68
|
+
* @param settings.xAxis The column name to use for the x-axis
|
|
69
|
+
* @param [settings.hiddenSeries] Array of hidden series names
|
|
70
|
+
* @param figure The figure to build the model for
|
|
71
|
+
* @param theme The theme for the figure. Defaults to ChartTheme
|
|
72
|
+
* @returns The FigureChartModel representing the figure
|
|
73
73
|
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
74
74
|
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
75
75
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/ChartModelFactory.ts"],"names":["dh","ChartUtils","FigureChartModel","ChartTheme","ChartModelFactory","makeModelFromSettings","settings","table","theme","figure","makeFigureFromSettings","tableCopy","copy","applyCustomColumns","customColumns","applyFilter","filter","applySort","sort","plot","Figure","create","makeFigureSettings","makeModel"],"mappings":";;;;AAAA,OAAOA,EAAP,MAAmD,uBAAnD;OACOC,U;OACAC,gB;OACAC,U;;AAUP,MAAMC,iBAAN,CAAwB;AACtB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC,SAArBC,qBAAqB,CAChCC,QADgC,EAEhCC,KAFgC,EAIX;AAAA;AAAA;AAAA,UADrBC,KACqB,0EADbL,UACa;AACrB,UAAMM,MAAM,SAASL,iBAAiB,CAACM,sBAAlB,CACnBJ,QADmB,EAEnBC,KAFmB,CAArB;AAIA,aAAO,IAAIL,gBAAJ,CAAqBO,MAArB,EAA6BH,QAA7B,EAAuCE,KAAvC,CAAP;AALqB;AAMtB;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACqC,SAAtBE,sBAAsB,CACjCJ,QADiC,EAEjCC,KAFiC,EAGhB;AAAA;AACjB;AACA;AACA;AACA;AACA,UAAMI,SAAS,SAASJ,KAAK,CAACK,IAAN,EAAxB;AACAD,MAAAA,SAAS,CAACE,kBAAV,CAA6BN,KAAK,CAACO,aAAnC;AACAH,MAAAA,SAAS,CAACI,WAAV,CAAsBR,KAAK,CAACS,MAA5B;AACAL,MAAAA,SAAS,CAACM,SAAV,CAAoBV,KAAK,CAACW,IAA1B;AAEA,aAAOlB,EAAE,CAACmB,IAAH,CAAQC,MAAR,CAAeC,MAAf,CACLpB,UAAU,CAACqB,kBAAX,CAA8BhB,QAA9B,EAAwCK,SAAxC,CADK,CAAP;AAViB;AAalB;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACwB,SAATY,SAAS,CACpBjB,QADoB,EAEpBG,MAFoB,EAIC;AAAA;AAAA;AAAA,UADrBD,KACqB,6EADbL,UACa;AACrB,aAAO,IAAID,gBAAJ,CAAqBO,MAArB,EAA6BH,QAA7B,EAAuCE,KAAvC,CAAP;AADqB;AAEtB;;AA/EqB;;AAkFxB,eAAeJ,iBAAf","sourcesContent":["import dh, { Figure, SeriesPlotStyle, Table } from '@deephaven/jsapi-shim';\nimport ChartUtils from './ChartUtils';\nimport FigureChartModel from './FigureChartModel';\nimport ChartTheme from './ChartTheme';\nimport ChartModel from './ChartModel';\n\ninterface ChartModelSettings {\n title: string;\n xAxis: string;\n series: string[];\n type: SeriesPlotStyle;\n}\n\nclass ChartModelFactory {\n /**\n * Creates a model from the settings provided.\n * Tries to create a Figure in the API with it.\n * @param settings The chart builder settings\n * @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated\n * @param settings.series The column names to use for creating the series of this chart\n * @param settings.type Chart builder type, from ChartBuilder.types\n * @param settings.xAxis The column name to use for the x-axis\n * @param [settings.hiddenSeries] Array of hidden series names\n * @param table The table to build the model for\n * @param theme The theme for the figure. Defaults to ChartTheme\n * @returns The ChartModel Promise representing the figure\n * CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel\n * This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel\n */\n static async makeModelFromSettings(\n settings: ChartModelSettings,\n table: Table,\n theme = ChartTheme\n ): Promise<ChartModel> {\n const figure = await ChartModelFactory.makeFigureFromSettings(\n settings,\n table\n );\n return new FigureChartModel(figure, settings, theme);\n }\n\n /**\n * Creates a model from the settings provided.\n * Tries to create a Figure in the API with it.\n * @param settings The chart builder settings\n * @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated\n * @param settings.series The column names to use for creating the series of this chart\n * @param settings.type Chart builder type, from ChartBuilder.types\n * @param settings.xAxis The column name to use for the x-axis\n * @param [settings.hiddenSeries] Array of hidden series names\n * @param table The table to build the model for\n * @returns The Figure created with the settings provided\n */\n static async makeFigureFromSettings(\n settings: ChartModelSettings,\n table: Table\n ): Promise<Figure> {\n // Copy the table first and then re-apply the filters from the original table\n // When we add toable linking we'll want to listen to the original table and update\n // the copied table with any changes that occur.\n // The table gets owned by the Figure that gets created, which closes the table\n const tableCopy = await table.copy();\n tableCopy.applyCustomColumns(table.customColumns);\n tableCopy.applyFilter(table.filter);\n tableCopy.applySort(table.sort);\n\n return dh.plot.Figure.create(\n ChartUtils.makeFigureSettings(settings, tableCopy)\n );\n }\n\n /**\n * Creates a model from the settings provided.\n * Tries to create a Figure in the API with it.\n * @param settings The chart builder settings\n * @param settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated\n * @param settings.series The column names to use for creating the series of this chart\n * @param settings.type Chart builder type, from ChartBuilder.types\n * @param settings.xAxis The column name to use for the x-axis\n * @param [settings.hiddenSeries] Array of hidden series names\n * @param figure The figure to build the model for\n * @param theme The theme for the figure. Defaults to ChartTheme\n * @returns The FigureChartModel representing the figure\n * CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel\n * This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel\n */\n static async makeModel(\n settings: Record<string, unknown> | undefined,\n figure: Figure,\n theme = ChartTheme\n ): Promise<ChartModel> {\n return new FigureChartModel(figure, settings, theme);\n }\n}\n\nexport default ChartModelFactory;\n"],"file":"ChartModelFactory.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/ChartTestUtils.js"],"names":["dh","ChartTestUtils","makeAxis","label","type","plot","AxisType","X","position","AxisPosition","BOTTOM","formatType","Axis","FORMAT_TYPE_NUMBER","formatPattern","log","makeDefaultAxes","DEFAULT_X_TITLE","DEFAULT_Y_TITLE","Y","makeSource","axis","SeriesDataSource","makeDefaultSources","axes","map","makeSeries","name","DEFAULT_SERIES_NAME","plotStyle","SeriesPlotStyle","SCATTER","sources","lineColor","shapeColor","Series","makeChart","title","DEFAULT_CHART_TITLE","series","Chart","makeFigure","charts","Figure"],"mappings":";;AAAA,OAAOA,EAAP,MAAe,uBAAf;;AAEA,MAAMC,cAAN,CAAqB;AASJ,SAARC,QAAQ,GAOP;AAAA,QAPQ;AACdC,MAAAA,KAAK,GAAG,MADM;AAEdC,MAAAA,IAAI,GAAGJ,EAAE,CAACK,IAAH,CAAQC,QAAR,CAAiBC,CAFV;AAGdC,MAAAA,QAAQ,GAAGR,EAAE,CAACK,IAAH,CAAQI,YAAR,CAAqBC,MAHlB;AAIdC,MAAAA,UAAU,GAAGX,EAAE,CAACY,IAAH,CAAQC,kBAJP;AAKdC,MAAAA,aAAa,GAAG,aALF;AAMdC,MAAAA,GAAG,GAAG;AANQ,KAOR,uEAAJ,EAAI;AACN,WAAO,IAAIf,EAAE,CAACY,IAAP,CAAY;AACjBT,MAAAA,KADiB;AAEjBC,MAAAA,IAFiB;AAGjBI,MAAAA,QAHiB;AAIjBG,MAAAA,UAJiB;AAKjBG,MAAAA,aALiB;AAMjBC,MAAAA;AANiB,KAAZ,CAAP;AAQD;;AAEqB,SAAfC,eAAe,GAAG;AACvB,WAAO,CACLf,cAAc,CAACC,QAAf,CAAwB;AACtBC,MAAAA,KAAK,EAAEF,cAAc,CAACgB,eADA;AAEtBb,MAAAA,IAAI,EAAEJ,EAAE,CAACK,IAA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UAAf,EAAD,CAFM;AAGfF,MAAAA,IAAI,GAAGvB,cAAc,CAACe,eAAf;AAHQ,KAIT,uEAAJ,EAAI;AACN,WAAO,IAAIhB,EAAE,CAACwC,KAAP,CAAa;AAAEH,MAAAA,KAAF;AAASE,MAAAA,MAAT;AAAiBf,MAAAA;AAAjB,KAAb,CAAP;AACD;;AAEgB,SAAViB,UAAU,GAGT;AAAA,QAHU;AAChBJ,MAAAA,KAAK,GAAG,QADQ;AAEhBK,MAAAA,MAAM,GAAG,CAACzC,cAAc,CAACmC,SAAf,EAAD;AAFO,KAGV,uEAAJ,EAAI;AACN,WAAO,IAAIpC,EAAE,CAACK,IAAH,CAAQsC,MAAZ,CAAmB;AAAEN,MAAAA,KAAF;AAASK,MAAAA;AAAT,KAAnB,CAAP;AACD;;AAxEkB;;gBAAfzC,c,yBACyB,a;;gBADzBA,c,qBAGqB,Q;;gBAHrBA,c,qBAKqB,Q;;gBALrBA,c,yBAOyB,U;;AAoE/B,eAAeA,cAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\n\nclass ChartTestUtils {\n static DEFAULT_CHART_TITLE = 'Chart Title';\n\n static DEFAULT_X_TITLE = 'X Axis';\n\n static DEFAULT_Y_TITLE = 'Y Axis';\n\n static DEFAULT_SERIES_NAME = 'MySeries';\n\n static makeAxis({\n label = 'Axis',\n type = dh.plot.AxisType.X,\n position = dh.plot.AxisPosition.BOTTOM,\n formatType = dh.Axis.FORMAT_TYPE_NUMBER,\n formatPattern = '###,###0.00',\n log = false,\n } = {}) {\n return new dh.Axis({\n label,\n type,\n position,\n formatType,\n formatPattern,\n log,\n });\n }\n\n static makeDefaultAxes() {\n return [\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_X_TITLE,\n type: dh.plot.AxisType.X,\n }),\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_Y_TITLE,\n type: dh.plot.AxisType.Y,\n }),\n ];\n }\n\n static makeSource({ axis = ChartTestUtils.makeAxis() }) {\n return new dh.SeriesDataSource({ axis, type: axis.type });\n }\n\n static makeDefaultSources() {\n const axes = ChartTestUtils.makeDefaultAxes();\n return axes.map(axis => ChartTestUtils.makeSource({ axis }));\n }\n\n static makeSeries({\n name = ChartTestUtils.DEFAULT_SERIES_NAME,\n plotStyle = dh.plot.SeriesPlotStyle.SCATTER,\n sources = ChartTestUtils.makeDefaultSources(),\n lineColor = null,\n shapeColor = null,\n } = {}) {\n return new dh.Series(name, plotStyle, sources, lineColor, shapeColor);\n }\n\n static makeChart({\n title = ChartTestUtils.DEFAULT_CHART_TITLE,\n series = [ChartTestUtils.makeSeries()],\n axes = ChartTestUtils.makeDefaultAxes(),\n } = {}) {\n return new dh.Chart({ title, series, axes });\n }\n\n static makeFigure({\n title = 'Figure',\n charts = [ChartTestUtils.makeChart()],\n } = {}) {\n return new dh.plot.Figure({ title, charts });\n }\n}\n\nexport default ChartTestUtils;\n"],"file":"ChartTestUtils.js"}
|
package/dist/ChartTheme.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
declare
|
|
2
|
-
paper_bgcolor:
|
|
3
|
-
plot_bgcolor:
|
|
4
|
-
title_color:
|
|
5
|
-
colorway:
|
|
6
|
-
gridcolor:
|
|
7
|
-
linecolor:
|
|
8
|
-
zerolinecolor:
|
|
9
|
-
activecolor:
|
|
10
|
-
rangebgcolor:
|
|
11
|
-
area_color:
|
|
12
|
-
trend_color:
|
|
13
|
-
line_color:
|
|
14
|
-
error_band_line_color:
|
|
15
|
-
error_band_fill_color:
|
|
16
|
-
ohlc_increasing:
|
|
17
|
-
ohlc_decreasing:
|
|
1
|
+
declare const _default: Readonly<{
|
|
2
|
+
paper_bgcolor: string;
|
|
3
|
+
plot_bgcolor: string;
|
|
4
|
+
title_color: string;
|
|
5
|
+
colorway: string;
|
|
6
|
+
gridcolor: string;
|
|
7
|
+
linecolor: string;
|
|
8
|
+
zerolinecolor: string;
|
|
9
|
+
activecolor: string;
|
|
10
|
+
rangebgcolor: string;
|
|
11
|
+
area_color: string;
|
|
12
|
+
trend_color: string;
|
|
13
|
+
line_color: string;
|
|
14
|
+
error_band_line_color: string;
|
|
15
|
+
error_band_fill_color: string;
|
|
16
|
+
ohlc_increasing: string;
|
|
17
|
+
ohlc_decreasing: string;
|
|
18
18
|
}>;
|
|
19
19
|
export default _default;
|
|
20
20
|
//# sourceMappingURL=ChartTheme.d.ts.map
|
package/dist/ChartTheme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTheme.d.ts","sourceRoot":"","sources":["../src/ChartTheme.
|
|
1
|
+
{"version":3,"file":"ChartTheme.d.ts","sourceRoot":"","sources":["../src/ChartTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,wBAiBG"}
|
package/dist/ChartTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/ChartTheme.ts"],"names":["ChartTheme","Object","freeze","paper_bgcolor","plot_bgcolor","title_color","colorway","gridcolor","linecolor","zerolinecolor","activecolor","rangebgcolor","area_color","trend_color","line_color","error_band_line_color","error_band_fill_color","ohlc_increasing","ohlc_decreasing"],"mappings":"OAAOA,U;AAEP,eAAeC,MAAM,CAACC,MAAP,CAAc;AAC3BC,EAAAA,aAAa,EAAEH,UAAU,CAAC,eAAD,CADE;AAE3BI,EAAAA,YAAY,EAAEJ,UAAU,CAAC,cAAD,CAFG;AAG3BK,EAAAA,WAAW,EAAEL,UAAU,CAAC,aAAD,CAHI;AAI3BM,EAAAA,QAAQ,EAAEN,UAAU,CAACM,QAJM;AAK3BC,EAAAA,SAAS,EAAEP,UAAU,CAACO,SALK;AAM3BC,EAAAA,SAAS,EAAER,UAAU,CAACQ,SANK;AAO3BC,EAAAA,aAAa,EAAET,UAAU,CAACS,aAPC;AAQ3BC,EAAAA,WAAW,EAAEV,UAAU,CAACU,WARG;AAS3BC,EAAAA,YAAY,EAAEX,UAAU,CAACW,YATE;AAU3BC,EAAAA,UAAU,EAAEZ,UAAU,CAAC,YAAD,CAVK;AAW3Ba,EAAAA,WAAW,EAAEb,UAAU,CAAC,aAAD,CAXI;AAY3Bc,EAAAA,UAAU,EAAEd,UAAU,CAAC,YAAD,CAZK;AAa3Be,EAAAA,qBAAqB,EAAEf,UAAU,CAAC,uBAAD,CAbN;AAc3BgB,EAAAA,qBAAqB,EAAEhB,UAAU,CAAC,uBAAD,CAdN;AAe3BiB,EAAAA,eAAe,EAAEjB,UAAU,CAAC,iBAAD,CAfA;AAgB3BkB,EAAAA,eAAe,EAAElB,UAAU,CAAC,iBAAD;AAhBA,CAAd,CAAf","sourcesContent":["import ChartTheme from './ChartTheme.module.scss';\n\nexport default Object.freeze({\n paper_bgcolor: ChartTheme['paper-bgcolor'],\n plot_bgcolor: ChartTheme['plot-bgcolor'],\n title_color: ChartTheme['title-color'],\n colorway: ChartTheme.colorway,\n gridcolor: ChartTheme.gridcolor,\n linecolor: ChartTheme.linecolor,\n zerolinecolor: ChartTheme.zerolinecolor,\n activecolor: ChartTheme.activecolor,\n rangebgcolor: ChartTheme.rangebgcolor,\n area_color: ChartTheme['area-color'],\n trend_color: ChartTheme['trend-color'],\n line_color: ChartTheme['line-color'],\n error_band_line_color: ChartTheme['error-band-line-color'],\n error_band_fill_color: ChartTheme['error-band-fill-color'],\n ohlc_increasing: ChartTheme['ohlc-increasing'],\n ohlc_decreasing: ChartTheme['ohlc-decreasing'],\n});\n"],"file":"ChartTheme.js"}
|
package/dist/ChartUtils.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare class ChartUtils {
|
|
|
27
27
|
* @param {String} plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle
|
|
28
28
|
* @param {boolean} isBusinessTime If the plot is using business time for an axis
|
|
29
29
|
*/
|
|
30
|
-
static getPlotlyChartType(plotStyle: string, isBusinessTime: boolean): "
|
|
30
|
+
static getPlotlyChartType(plotStyle: string, isBusinessTime: boolean): "pie" | "scattergl" | "scatter" | "bar" | "treemap" | "histogram" | "ohlc" | null;
|
|
31
31
|
/**
|
|
32
32
|
* Converts the Iris plot style into a plotly chart mode
|
|
33
33
|
* @param {String} plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle.*
|
|
@@ -38,7 +38,7 @@ declare class ChartUtils {
|
|
|
38
38
|
* @param {dh.plot.SeriesPlotStyle} plotStyle The plot style of the series
|
|
39
39
|
* @param {dh.plot.SourceType} sourceType The source type for the series
|
|
40
40
|
*/
|
|
41
|
-
static getPlotlyProperty(plotStyle: dh.plot.SeriesPlotStyle, sourceType: dh.plot.SourceType): "
|
|
41
|
+
static getPlotlyProperty(plotStyle: dh.plot.SeriesPlotStyle, sourceType: dh.plot.SourceType): "text" | "x" | "close" | "y" | "z" | "labels" | "values" | "ids" | "parents" | "marker.colors" | "xLow" | "xHigh" | "yLow" | "yHigh" | "time" | "open" | "high" | "low" | "shape" | "size" | "label" | "color" | "parent" | "hovertext";
|
|
42
42
|
static getPlotlySeriesOrientation(series: any): string;
|
|
43
43
|
/**
|
|
44
44
|
* Generate the plotly error bar data from the passed in data.
|
|
@@ -120,7 +120,7 @@ declare class ChartUtils {
|
|
|
120
120
|
* @returns {Map<string, object>} A map of axis layout property names to axis formats
|
|
121
121
|
*/
|
|
122
122
|
static getAxisFormats(figure: dh.plot.Figure, formatter: Formatter): Map<string, object>;
|
|
123
|
-
static getChartType(plotStyle: any, isBusinessTime: any): "
|
|
123
|
+
static getChartType(plotStyle: any, isBusinessTime: any): "pie" | "scattergl" | "scatter" | "bar" | "treemap" | "histogram" | "ohlc" | null;
|
|
124
124
|
/**
|
|
125
125
|
* Return the plotly axis property name
|
|
126
126
|
* @param {dh.plot.AxisType} axisType The axis type to get the property name for
|
|
@@ -130,7 +130,7 @@ declare class ChartUtils {
|
|
|
130
130
|
* Returns the plotly "side" value for the provided axis position
|
|
131
131
|
* @param {dh.plot.AxisPosition} axisPosition The Iris AxisPosition of the axis
|
|
132
132
|
*/
|
|
133
|
-
static getAxisSide(axisPosition: dh.plot.AxisPosition): "
|
|
133
|
+
static getAxisSide(axisPosition: dh.plot.AxisPosition): "top" | "left" | "right" | "bottom" | null;
|
|
134
134
|
/**
|
|
135
135
|
* Retrieve the chart that contains the passed in series from the figure
|
|
136
136
|
* @param {dh.plot.Figure} figure The figure to retrieve the chart from
|
package/dist/ChartUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartUtils.d.ts","sourceRoot":"","sources":["../src/ChartUtils.js"],"names":[],"mappings":";AAeA;IACE,iCAAgC;IAEhC,6BAA6B;IAE7B,6BAA2B;IAE3B,4BAAyB;IAEzB,+BAA4B;IAE5B,+BAA8B;IAE9B;;;OAGG;IAEH,2BAAkD;IAElD;;;;;;OAA8E;IAE9E;;OAAuD;IAEvD,oCAAiC;IAEjC;;;;OAIG;IACH,6DAFW,OAAO,qFA+BjB;IAED;;;OAGG;IACH,yEASC;IAED;;;;OAIG;IACH,sUAkFC;IAED,uDAOC;IAED;;;;;;;;OAQG;IACH,6BANW,aAAa,QACb,aAAa,SACb,aAAa,GAEX,MAAM,CAWlB;IAED;;;;MA4CC;IAED,6CAEC;IAED;;;;;aA2CC;IAED;;;;OAIG;IACH,yFA8BC;IAED;;;;;;OAMG;IACH,kCAJW,MAAM,QACN,MAAM,cACN,OAAO,UAqBjB;IAED;;;;;OAKG;IACH,kFAYC;IAED;;;;;OAKG;IACH,iCAJW,MAAM,YACN,MAAM,GACJ,OAAO,GAAC,MAAM,CAO1B;IAED;;;;OAIG;IACH,iCAHW,MAAM,GACJ,MAAM,EAAE,CAOpB;IAED;;;OAGG;IACH,8EAFa,MAAM,CASlB;IAED;;;;;;;OAOG;IACH,qEALW,sBAAsB,cAAc,CAAC,oBACrC,OAAO,GAAC,MAAM,SACd,MAAM,GACJ,MAAM,CAoClB;IAED,0GA2BC;IAED,
|
|
1
|
+
{"version":3,"file":"ChartUtils.d.ts","sourceRoot":"","sources":["../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