@deephaven/js-plugin-plotly-express 0.12.1 → 0.13.1
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/bundle/index.js +1283 -1217
- package/package.json +4 -3
- package/dist/DashboardPlugin.d.ts +0 -4
- package/dist/DashboardPlugin.d.ts.map +0 -1
- package/dist/DashboardPlugin.js +0 -39
- package/dist/DashboardPlugin.js.map +0 -1
- package/dist/PlotlyExpressChart.d.ts +0 -5
- package/dist/PlotlyExpressChart.d.ts.map +0 -1
- package/dist/PlotlyExpressChart.js +0 -35
- package/dist/PlotlyExpressChart.js.map +0 -1
- package/dist/PlotlyExpressChartModel.d.ts +0 -118
- package/dist/PlotlyExpressChartModel.d.ts.map +0 -1
- package/dist/PlotlyExpressChartModel.js +0 -474
- package/dist/PlotlyExpressChartModel.js.map +0 -1
- package/dist/PlotlyExpressChartPanel.d.ts +0 -5
- package/dist/PlotlyExpressChartPanel.d.ts.map +0 -1
- package/dist/PlotlyExpressChartPanel.js +0 -36
- package/dist/PlotlyExpressChartPanel.js.map +0 -1
- package/dist/PlotlyExpressChartUtils.d.ts +0 -123
- package/dist/PlotlyExpressChartUtils.d.ts.map +0 -1
- package/dist/PlotlyExpressChartUtils.js +0 -176
- package/dist/PlotlyExpressChartUtils.js.map +0 -1
- package/dist/PlotlyExpressPlugin.d.ts +0 -5
- package/dist/PlotlyExpressPlugin.d.ts.map +0 -1
- package/dist/PlotlyExpressPlugin.js +0 -14
- package/dist/PlotlyExpressPlugin.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/useHandleSceneTicks.d.ts +0 -4
- package/dist/useHandleSceneTicks.d.ts.map +0 -1
- package/dist/useHandleSceneTicks.js +0 -36
- package/dist/useHandleSceneTicks.js.map +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type { Data, LayoutAxis, PlotlyDataLayoutConfig } from 'plotly.js';
|
|
2
|
-
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
3
|
-
export interface PlotlyChartWidget {
|
|
4
|
-
getDataAsBase64: () => string;
|
|
5
|
-
exportedObjects: {
|
|
6
|
-
fetch: () => Promise<DhType.Table>;
|
|
7
|
-
}[];
|
|
8
|
-
addEventListener: (type: string, fn: (event: CustomEvent<PlotlyChartWidget>) => () => void) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface PlotlyChartWidgetData {
|
|
11
|
-
type: string;
|
|
12
|
-
figure: {
|
|
13
|
-
deephaven: {
|
|
14
|
-
mappings: Array<{
|
|
15
|
-
table: number;
|
|
16
|
-
data_columns: Record<string, string[]>;
|
|
17
|
-
}>;
|
|
18
|
-
is_user_set_template: boolean;
|
|
19
|
-
is_user_set_color: boolean;
|
|
20
|
-
};
|
|
21
|
-
plotly: PlotlyDataLayoutConfig;
|
|
22
|
-
};
|
|
23
|
-
revision: number;
|
|
24
|
-
new_references: number[];
|
|
25
|
-
removed_references: number[];
|
|
26
|
-
}
|
|
27
|
-
export declare function getWidgetData(widgetInfo: DhType.Widget): PlotlyChartWidgetData;
|
|
28
|
-
export declare function getDataMappings(widgetData: PlotlyChartWidgetData): Map<number, Map<string, string[]>>;
|
|
29
|
-
/**
|
|
30
|
-
* Removes the default colors from the data
|
|
31
|
-
* Data color is not removed if the user set the color specifically or the plot type sets it
|
|
32
|
-
*
|
|
33
|
-
* This only checks if the marker or line color is set to a color in the colorway.
|
|
34
|
-
* This means it is not possible to change the order of the colorway and use the same colors.
|
|
35
|
-
*
|
|
36
|
-
* @param colorway The colorway from plotly
|
|
37
|
-
* @param data The data to remove the colorway from. This will be mutated
|
|
38
|
-
*/
|
|
39
|
-
export declare function removeColorsFromData(colorway: string[], data: Data[]): void;
|
|
40
|
-
/**
|
|
41
|
-
* Gets the path parts from a path replacement string from the widget data.
|
|
42
|
-
* The parts start with the plotly data array as the root.
|
|
43
|
-
* E.g. /plotly/data/0/x -> ['0', 'x']
|
|
44
|
-
* @param path The path from the widget data
|
|
45
|
-
* @returns The path parts within the plotly data array
|
|
46
|
-
*/
|
|
47
|
-
export declare function getPathParts(path: string): string[];
|
|
48
|
-
/**
|
|
49
|
-
* Checks if a plotly series is a line series without markers
|
|
50
|
-
* @param data The plotly data to check
|
|
51
|
-
* @returns True if the data is a line series without marakers
|
|
52
|
-
*/
|
|
53
|
-
export declare function isLineSeries(data: Data): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Checks if a plotly axis type is automatically determined based on the data
|
|
56
|
-
* @param axis The plotly axis to check
|
|
57
|
-
* @returns True if the axis type is determined based on the data
|
|
58
|
-
*/
|
|
59
|
-
export declare function isAutoAxis(axis: Partial<LayoutAxis>): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Checks if a plotly axis type is linear
|
|
62
|
-
* @param axis The plotly axis to check
|
|
63
|
-
* @returns True if the axis is a linear axis
|
|
64
|
-
*/
|
|
65
|
-
export declare function isLinearAxis(axis: Partial<LayoutAxis>): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Check if 2 axis ranges are the same
|
|
68
|
-
* A null range indicates an auto range
|
|
69
|
-
* @param range1 The first axis range options
|
|
70
|
-
* @param range2 The second axis range options
|
|
71
|
-
* @returns True if the range options describe the same range
|
|
72
|
-
*/
|
|
73
|
-
export declare function areSameAxisRange(range1: unknown[] | null, range2: unknown[] | null): boolean;
|
|
74
|
-
export interface DownsampleInfo {
|
|
75
|
-
type: 'linear';
|
|
76
|
-
/**
|
|
77
|
-
* The original table before downsampling.
|
|
78
|
-
*/
|
|
79
|
-
originalTable: DhType.Table;
|
|
80
|
-
/**
|
|
81
|
-
* The x column to downsample.
|
|
82
|
-
*/
|
|
83
|
-
xCol: string;
|
|
84
|
-
/**
|
|
85
|
-
* The y columns to downsample.
|
|
86
|
-
*/
|
|
87
|
-
yCols: string[];
|
|
88
|
-
/**
|
|
89
|
-
* The width of the x-axis in pixels.
|
|
90
|
-
*/
|
|
91
|
-
width: number;
|
|
92
|
-
/**
|
|
93
|
-
* The range of the x-axis. Null if set to autorange.
|
|
94
|
-
*/
|
|
95
|
-
range: string[] | null;
|
|
96
|
-
/**
|
|
97
|
-
* If the range is a datae or number
|
|
98
|
-
*/
|
|
99
|
-
rangeType: 'date' | 'number';
|
|
100
|
-
}
|
|
101
|
-
export declare function downsample(dh: typeof DhType, info: DownsampleInfo): Promise<DhType.Table>;
|
|
102
|
-
/**
|
|
103
|
-
* Get the indexes of the replaceable WebGL traces in the data
|
|
104
|
-
* A replaceable WebGL has a type that ends with 'gl' which indicates it has a SVG equivalent
|
|
105
|
-
* @param data The data to check
|
|
106
|
-
* @returns The indexes of the WebGL traces
|
|
107
|
-
*/
|
|
108
|
-
export declare function getReplaceableWebGlTraceIndices(data: Data[]): Set<number>;
|
|
109
|
-
/**
|
|
110
|
-
* Check if the data contains any traces that are at least partially powered by WebGL and have no SVG equivalent.
|
|
111
|
-
* @param data The data to check for WebGL traces
|
|
112
|
-
* @returns True if the data contains any unreplaceable WebGL traces
|
|
113
|
-
*/
|
|
114
|
-
export declare function hasUnreplaceableWebGlTraces(data: Data[]): boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Set traces to use WebGL if WebGL is enabled and the trace was originally WebGL
|
|
117
|
-
* or swap out WebGL for SVG if WebGL is disabled and the trace was originally WebGL
|
|
118
|
-
* @param data The plotly figure data to update
|
|
119
|
-
* @param webgl True if WebGL is enabled
|
|
120
|
-
* @param webGlTraceIndices The indexes of the traces that are originally WebGL traces
|
|
121
|
-
*/
|
|
122
|
-
export declare function setWebGlTraceType(data: Data[], webgl: boolean, webGlTraceIndices: Set<number>): void;
|
|
123
|
-
//# sourceMappingURL=PlotlyExpressChartUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressChartUtils.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAA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AE,IAAI,EAAE,EACZ,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC7B,IAAI,CAWN"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Traces that are at least partially powered by WebGL and have no SVG equivalent.
|
|
3
|
-
* https://plotly.com/python/webgl-vs-svg/
|
|
4
|
-
*/
|
|
5
|
-
const UNREPLACEABLE_WEBGL_TRACE_TYPES = new Set([
|
|
6
|
-
'splom',
|
|
7
|
-
'parcoords',
|
|
8
|
-
'scatter3d',
|
|
9
|
-
'surface',
|
|
10
|
-
'mesh3d',
|
|
11
|
-
'cone',
|
|
12
|
-
'streamtube',
|
|
13
|
-
'scattermapbox',
|
|
14
|
-
'choroplethmapbox',
|
|
15
|
-
'densitymapbox',
|
|
16
|
-
]);
|
|
17
|
-
export function getWidgetData(widgetInfo) {
|
|
18
|
-
return JSON.parse(widgetInfo.getDataAsString());
|
|
19
|
-
}
|
|
20
|
-
export function getDataMappings(widgetData) {
|
|
21
|
-
const data = widgetData.figure;
|
|
22
|
-
// Maps a reference index to a map of column name to an array of the paths where its data should be
|
|
23
|
-
const tableColumnReplacementMap = new Map();
|
|
24
|
-
data.deephaven.mappings.forEach(({ table: tableIndex, data_columns: dataColumns }) => {
|
|
25
|
-
var _a;
|
|
26
|
-
const existingColumnMap = (_a = tableColumnReplacementMap.get(tableIndex)) !== null && _a !== void 0 ? _a : new Map();
|
|
27
|
-
tableColumnReplacementMap.set(tableIndex, existingColumnMap);
|
|
28
|
-
// For each { columnName: [replacePaths] } in the object, add to the tableColumnReplacementMap
|
|
29
|
-
Object.entries(dataColumns).forEach(([columnName, paths]) => {
|
|
30
|
-
const existingPaths = existingColumnMap.get(columnName);
|
|
31
|
-
if (existingPaths !== undefined) {
|
|
32
|
-
existingPaths.push(...paths);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
existingColumnMap.set(columnName, [...paths]);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
return tableColumnReplacementMap;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Removes the default colors from the data
|
|
43
|
-
* Data color is not removed if the user set the color specifically or the plot type sets it
|
|
44
|
-
*
|
|
45
|
-
* This only checks if the marker or line color is set to a color in the colorway.
|
|
46
|
-
* This means it is not possible to change the order of the colorway and use the same colors.
|
|
47
|
-
*
|
|
48
|
-
* @param colorway The colorway from plotly
|
|
49
|
-
* @param data The data to remove the colorway from. This will be mutated
|
|
50
|
-
*/
|
|
51
|
-
export function removeColorsFromData(colorway, data) {
|
|
52
|
-
const plotlyColors = new Set(colorway.map(color => color.toUpperCase()));
|
|
53
|
-
// Just check if the colors are in the colorway at any point
|
|
54
|
-
// Plotly has many different ways to layer/order series
|
|
55
|
-
for (let i = 0; i < data.length; i += 1) {
|
|
56
|
-
const trace = data[i];
|
|
57
|
-
// There are multiple datatypes in plotly and some don't contain marker or marker.color
|
|
58
|
-
if ('marker' in trace &&
|
|
59
|
-
trace.marker != null &&
|
|
60
|
-
'color' in trace.marker &&
|
|
61
|
-
typeof trace.marker.color === 'string') {
|
|
62
|
-
if (plotlyColors.has(trace.marker.color.toUpperCase())) {
|
|
63
|
-
delete trace.marker.color;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if ('line' in trace &&
|
|
67
|
-
trace.line != null &&
|
|
68
|
-
'color' in trace.line &&
|
|
69
|
-
typeof trace.line.color === 'string') {
|
|
70
|
-
if (plotlyColors.has(trace.line.color.toUpperCase())) {
|
|
71
|
-
delete trace.line.color;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Gets the path parts from a path replacement string from the widget data.
|
|
78
|
-
* The parts start with the plotly data array as the root.
|
|
79
|
-
* E.g. /plotly/data/0/x -> ['0', 'x']
|
|
80
|
-
* @param path The path from the widget data
|
|
81
|
-
* @returns The path parts within the plotly data array
|
|
82
|
-
*/
|
|
83
|
-
export function getPathParts(path) {
|
|
84
|
-
return path
|
|
85
|
-
.split('/')
|
|
86
|
-
.filter(part => part !== '' && part !== 'plotly' && part !== 'data');
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Checks if a plotly series is a line series without markers
|
|
90
|
-
* @param data The plotly data to check
|
|
91
|
-
* @returns True if the data is a line series without marakers
|
|
92
|
-
*/
|
|
93
|
-
export function isLineSeries(data) {
|
|
94
|
-
return ((data.type === 'scatter' || data.type === 'scattergl') &&
|
|
95
|
-
data.mode === 'lines');
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Checks if a plotly axis type is automatically determined based on the data
|
|
99
|
-
* @param axis The plotly axis to check
|
|
100
|
-
* @returns True if the axis type is determined based on the data
|
|
101
|
-
*/
|
|
102
|
-
export function isAutoAxis(axis) {
|
|
103
|
-
return axis.type == null || axis.type === '-';
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Checks if a plotly axis type is linear
|
|
107
|
-
* @param axis The plotly axis to check
|
|
108
|
-
* @returns True if the axis is a linear axis
|
|
109
|
-
*/
|
|
110
|
-
export function isLinearAxis(axis) {
|
|
111
|
-
return axis.type === 'linear' || axis.type === 'date';
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Check if 2 axis ranges are the same
|
|
115
|
-
* A null range indicates an auto range
|
|
116
|
-
* @param range1 The first axis range options
|
|
117
|
-
* @param range2 The second axis range options
|
|
118
|
-
* @returns True if the range options describe the same range
|
|
119
|
-
*/
|
|
120
|
-
export function areSameAxisRange(range1, range2) {
|
|
121
|
-
return ((range1 === null && range2 === null) ||
|
|
122
|
-
(range1 != null &&
|
|
123
|
-
range2 != null &&
|
|
124
|
-
range1[0] === range2[0] &&
|
|
125
|
-
range1[1] === range2[1]));
|
|
126
|
-
}
|
|
127
|
-
export function downsample(dh, info) {
|
|
128
|
-
var _a;
|
|
129
|
-
return dh.plot.Downsample.runChartDownsample(info.originalTable, info.xCol, info.yCols, info.width, (_a = info.range) === null || _a === void 0 ? void 0 : _a.map(val => info.rangeType === 'date'
|
|
130
|
-
? dh.DateWrapper.ofJsDate(new Date(val))
|
|
131
|
-
: dh.LongWrapper.ofString(val)));
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Get the indexes of the replaceable WebGL traces in the data
|
|
135
|
-
* A replaceable WebGL has a type that ends with 'gl' which indicates it has a SVG equivalent
|
|
136
|
-
* @param data The data to check
|
|
137
|
-
* @returns The indexes of the WebGL traces
|
|
138
|
-
*/
|
|
139
|
-
export function getReplaceableWebGlTraceIndices(data) {
|
|
140
|
-
const webGlTraceIndexes = new Set();
|
|
141
|
-
data.forEach((trace, index) => {
|
|
142
|
-
if (trace.type && trace.type.endsWith('gl')) {
|
|
143
|
-
webGlTraceIndexes.add(index);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
return webGlTraceIndexes;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Check if the data contains any traces that are at least partially powered by WebGL and have no SVG equivalent.
|
|
150
|
-
* @param data The data to check for WebGL traces
|
|
151
|
-
* @returns True if the data contains any unreplaceable WebGL traces
|
|
152
|
-
*/
|
|
153
|
-
export function hasUnreplaceableWebGlTraces(data) {
|
|
154
|
-
return data.some(trace => trace.type && UNREPLACEABLE_WEBGL_TRACE_TYPES.has(trace.type));
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Set traces to use WebGL if WebGL is enabled and the trace was originally WebGL
|
|
158
|
-
* or swap out WebGL for SVG if WebGL is disabled and the trace was originally WebGL
|
|
159
|
-
* @param data The plotly figure data to update
|
|
160
|
-
* @param webgl True if WebGL is enabled
|
|
161
|
-
* @param webGlTraceIndices The indexes of the traces that are originally WebGL traces
|
|
162
|
-
*/
|
|
163
|
-
export function setWebGlTraceType(data, webgl, webGlTraceIndices) {
|
|
164
|
-
webGlTraceIndices.forEach(index => {
|
|
165
|
-
const trace = data[index];
|
|
166
|
-
if (webgl && trace.type && !trace.type.endsWith('gl')) {
|
|
167
|
-
// If WebGL is enabled and the trace is not already a WebGL trace, make it one
|
|
168
|
-
trace.type = `${trace.type}gl`;
|
|
169
|
-
}
|
|
170
|
-
else if (!webgl && trace.type && trace.type.endsWith('gl')) {
|
|
171
|
-
// If WebGL is disabled and the trace is a WebGL trace, remove the 'gl'
|
|
172
|
-
trace.type = trace.type.substring(0, trace.type.length - 2);
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
//# sourceMappingURL=PlotlyExpressChartUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressChartUtils.js","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,OAAO;IACP,WAAW;IACX,WAAW;IACX,SAAS;IACT,QAAQ;IACR,MAAM;IACN,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,eAAe;CAChB,CAAC,CAAC;AA6BH,MAAM,UAAU,aAAa,CAC3B,UAAyB;IAEzB,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,UAAiC;IAEjC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC;IAE/B,mGAAmG;IACnG,MAAM,yBAAyB,GAAG,IAAI,GAAG,EAAiC,CAAC;IAE3E,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAC7B,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,EAAE;;QACnD,MAAM,iBAAiB,GACrB,MAAA,yBAAyB,CAAC,GAAG,CAAC,UAAU,CAAC,mCACzC,IAAI,GAAG,EAAoB,CAAC;QAC9B,yBAAyB,CAAC,GAAG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C,IAAI,CAAC,CACvE,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,KAAc,EACd,iBAA8B;IAE9B,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACrD,8EAA8E;YAC9E,KAAK,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,IAAI,IAAgB,CAAC;SAC5C;aAAM,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC5D,uEAAuE;YACvE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAa,CAAC;SACzE;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressPlugin.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAIjD,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,EAAE,CAAC,MAAM,CAOvD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PluginType } from '@deephaven/plugin';
|
|
2
|
-
import { vsGraph } from '@deephaven/icons';
|
|
3
|
-
import { PlotlyExpressChart } from './PlotlyExpressChart.js';
|
|
4
|
-
import { PlotlyExpressChartPanel } from './PlotlyExpressChartPanel.js';
|
|
5
|
-
export const PlotlyExpressPlugin = {
|
|
6
|
-
name: '@deephaven/plotly-express',
|
|
7
|
-
type: PluginType.WIDGET_PLUGIN,
|
|
8
|
-
supportedTypes: 'deephaven.plot.express.DeephavenFigure',
|
|
9
|
-
component: PlotlyExpressChart,
|
|
10
|
-
panelComponent: PlotlyExpressChartPanel,
|
|
11
|
-
icon: vsGraph,
|
|
12
|
-
};
|
|
13
|
-
export default PlotlyExpressPlugin;
|
|
14
|
-
//# sourceMappingURL=PlotlyExpressPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressPlugin.js","sourceRoot":"","sources":["../src/PlotlyExpressPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,UAAU,CAAC,aAAa;IAC9B,cAAc,EAAE,wCAAwC;IACxD,SAAS,EAAE,kBAAkB;IAC7B,cAAc,EAAE,uBAAuB;IACvC,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PlotlyExpressPlugin } from './PlotlyExpressPlugin.js';
|
|
2
|
-
export * from './DashboardPlugin.js';
|
|
3
|
-
export * from './PlotlyExpressChartModel.js';
|
|
4
|
-
export * from './PlotlyExpressChartUtils.js';
|
|
5
|
-
export default PlotlyExpressPlugin;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAE7C,eAAe,mBAAmB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PlotlyExpressPlugin } from './PlotlyExpressPlugin.js';
|
|
2
|
-
// Export legacy dashboard plugin as named export for backwards compatibility
|
|
3
|
-
export * from './DashboardPlugin.js';
|
|
4
|
-
export * from './PlotlyExpressChartModel.js';
|
|
5
|
-
export * from './PlotlyExpressChartUtils.js';
|
|
6
|
-
export default PlotlyExpressPlugin;
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,6EAA6E;AAC7E,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAE7C,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import PlotlyExpressChartModel from './PlotlyExpressChartModel.js';
|
|
2
|
-
export declare function useHandleSceneTicks(model: PlotlyExpressChartModel | undefined, container: HTMLDivElement | null): void;
|
|
3
|
-
export default useHandleSceneTicks;
|
|
4
|
-
//# sourceMappingURL=useHandleSceneTicks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHandleSceneTicks.d.ts","sourceRoot":"","sources":["../src/useHandleSceneTicks.ts"],"names":[],"mappings":"AACA,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,uBAAuB,GAAG,SAAS,EAC1C,SAAS,EAAE,cAAc,GAAG,IAAI,GAC/B,IAAI,CAsCN;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
export function useHandleSceneTicks(model, container) {
|
|
3
|
-
useEffect(() => {
|
|
4
|
-
// Plotly scenes and geo views reset when our data ticks
|
|
5
|
-
// Pause rendering data updates when the user is manipulating a scene
|
|
6
|
-
if (!model || !container || !model.shouldPauseOnUserInteraction()) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
function handleMouseDown() {
|
|
10
|
-
model === null || model === void 0 ? void 0 : model.pauseUpdates();
|
|
11
|
-
// The once option removes the listener after it is called
|
|
12
|
-
window.addEventListener('mouseup', handleMouseUp, { once: true });
|
|
13
|
-
}
|
|
14
|
-
function handleMouseUp() {
|
|
15
|
-
model === null || model === void 0 ? void 0 : model.resumeUpdates();
|
|
16
|
-
}
|
|
17
|
-
let wheelTimeout = 0;
|
|
18
|
-
function handleWheel() {
|
|
19
|
-
model === null || model === void 0 ? void 0 : model.pauseUpdates();
|
|
20
|
-
window.clearTimeout(wheelTimeout);
|
|
21
|
-
wheelTimeout = window.setTimeout(() => {
|
|
22
|
-
model === null || model === void 0 ? void 0 : model.resumeUpdates();
|
|
23
|
-
}, 300);
|
|
24
|
-
}
|
|
25
|
-
container.addEventListener('mousedown', handleMouseDown);
|
|
26
|
-
container.addEventListener('wheel', handleWheel);
|
|
27
|
-
return () => {
|
|
28
|
-
window.clearTimeout(wheelTimeout);
|
|
29
|
-
window.removeEventListener('mouseup', handleMouseUp);
|
|
30
|
-
container.removeEventListener('mousedown', handleMouseDown);
|
|
31
|
-
container.removeEventListener('wheel', handleWheel);
|
|
32
|
-
};
|
|
33
|
-
}, [model, container]);
|
|
34
|
-
}
|
|
35
|
-
export default useHandleSceneTicks;
|
|
36
|
-
//# sourceMappingURL=useHandleSceneTicks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHandleSceneTicks.js","sourceRoot":"","sources":["../src/useHandleSceneTicks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,UAAU,mBAAmB,CACjC,KAA0C,EAC1C,SAAgC;IAEhC,SAAS,CAAC,GAAG,EAAE;QACb,wDAAwD;QACxD,qEAAqE;QACrE,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE;YACjE,OAAO;SACR;QAED,SAAS,eAAe;YACtB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,EAAE,CAAC;YACtB,0DAA0D;YAC1D,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,SAAS,aAAa;YACpB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,EAAE,CAAC;QACzB,CAAC;QAED,IAAI,YAAY,GAAG,CAAC,CAAC;QAErB,SAAS,WAAW;YAClB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,EAAE,CAAC;YACtB,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAClC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACpC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,EAAE,CAAC;YACzB,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;QAED,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QACzD,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAEjD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,YAAY,CAAC,YAA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