@deephaven/js-plugin-plotly-express 0.15.0 → 0.16.0
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/DashboardPlugin.d.ts +4 -0
- package/dist/DashboardPlugin.d.ts.map +1 -0
- package/dist/DashboardPlugin.js +39 -0
- package/dist/DashboardPlugin.js.map +1 -0
- package/dist/PlotlyExpressChart.d.ts +5 -0
- package/dist/PlotlyExpressChart.d.ts.map +1 -0
- package/dist/PlotlyExpressChart.js +38 -0
- package/dist/PlotlyExpressChart.js.map +1 -0
- package/dist/PlotlyExpressChartModel.d.ts +163 -0
- package/dist/PlotlyExpressChartModel.d.ts.map +1 -0
- package/dist/PlotlyExpressChartModel.js +609 -0
- package/dist/PlotlyExpressChartModel.js.map +1 -0
- package/dist/PlotlyExpressChartPanel.d.ts +5 -0
- package/dist/PlotlyExpressChartPanel.d.ts.map +1 -0
- package/dist/PlotlyExpressChartPanel.js +36 -0
- package/dist/PlotlyExpressChartPanel.js.map +1 -0
- package/dist/PlotlyExpressChartUtils.d.ts +222 -0
- package/dist/PlotlyExpressChartUtils.d.ts.map +1 -0
- package/dist/PlotlyExpressChartUtils.js +432 -0
- package/dist/PlotlyExpressChartUtils.js.map +1 -0
- package/dist/PlotlyExpressPlugin.d.ts +5 -0
- package/dist/PlotlyExpressPlugin.d.ts.map +1 -0
- package/dist/PlotlyExpressPlugin.js +14 -0
- package/dist/PlotlyExpressPlugin.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/useHandleSceneTicks.d.ts +4 -0
- package/dist/useHandleSceneTicks.d.ts.map +1 -0
- package/dist/useHandleSceneTicks.js +36 -0
- package/dist/useHandleSceneTicks.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
import { ChartModel, ChartUtils } from '@deephaven/chart';
|
|
2
|
+
import Log from '@deephaven/log';
|
|
3
|
+
import memoize from 'memoizee';
|
|
4
|
+
import { areSameAxisRange, downsample, getDataMappings, getPathParts, getReplaceableWebGlTraceIndices, getWidgetData, isAutoAxis, isLineSeries, isLinearAxis, removeColorsFromData, setWebGlTraceType, hasUnreplaceableWebGlTraces, isSingleValue, replaceValueFormat, setDefaultValueFormat, getDataTypeMap, IS_WEBGL_SUPPORTED, setRangebreaksFromCalendar, } from './PlotlyExpressChartUtils';
|
|
5
|
+
const log = Log.module('@deephaven/js-plugin-plotly-express.ChartModel');
|
|
6
|
+
export class PlotlyExpressChartModel extends ChartModel {
|
|
7
|
+
static canFetch(table) {
|
|
8
|
+
return table.size <= PlotlyExpressChartModel.MAX_FETCH_SIZE;
|
|
9
|
+
}
|
|
10
|
+
constructor(dh, widget, refetch) {
|
|
11
|
+
super(dh);
|
|
12
|
+
this.isSubscribed = false;
|
|
13
|
+
/**
|
|
14
|
+
* Map of table index to Table object.
|
|
15
|
+
*/
|
|
16
|
+
this.tableReferenceMap = new Map();
|
|
17
|
+
/**
|
|
18
|
+
* Map of downsampled table indexes to original Table object.
|
|
19
|
+
*/
|
|
20
|
+
this.downsampleMap = new Map();
|
|
21
|
+
/**
|
|
22
|
+
* Map of table index to TableSubscription object.
|
|
23
|
+
*/
|
|
24
|
+
this.tableSubscriptionMap = new Map();
|
|
25
|
+
/**
|
|
26
|
+
* Map of table index to cleanup function for the subscription.
|
|
27
|
+
*/
|
|
28
|
+
this.subscriptionCleanupMap = new Map();
|
|
29
|
+
/**
|
|
30
|
+
* Map of table index to map of column names to array of paths where the data should be replaced.
|
|
31
|
+
*/
|
|
32
|
+
this.tableColumnReplacementMap = new Map();
|
|
33
|
+
/**
|
|
34
|
+
* Map of table index to ChartData object. Used to handle data delta updates.
|
|
35
|
+
*/
|
|
36
|
+
this.chartDataMap = new Map();
|
|
37
|
+
/**
|
|
38
|
+
* Map of table index to object where the keys are column names and the values are arrays of data.
|
|
39
|
+
* This data is the full array of data for the column since ChartData doesn't have a clean way to get it at any time.
|
|
40
|
+
*/
|
|
41
|
+
this.tableDataMap = new Map();
|
|
42
|
+
this.plotlyData = [];
|
|
43
|
+
this.layout = {};
|
|
44
|
+
this.isPaused = false;
|
|
45
|
+
this.hasPendingUpdate = false;
|
|
46
|
+
this.hasInitialLoadCompleted = false;
|
|
47
|
+
this.isDownsamplingDisabled = false;
|
|
48
|
+
this.isWebGlSupported = IS_WEBGL_SUPPORTED;
|
|
49
|
+
/**
|
|
50
|
+
* Set of traces that are originally WebGL and can be replaced with non-WebGL traces.
|
|
51
|
+
* These need to be replaced if WebGL is disabled and re-enabled if WebGL is enabled again.
|
|
52
|
+
*/
|
|
53
|
+
this.webGlTraceIndices = new Set();
|
|
54
|
+
/**
|
|
55
|
+
* The WebGl warning is only shown once per chart. When the user acknowledges the warning, it will not be shown again.
|
|
56
|
+
*/
|
|
57
|
+
this.hasAcknowledgedWebGlWarning = false;
|
|
58
|
+
/**
|
|
59
|
+
* A calendar object that is used to set rangebreaks on a time axis.
|
|
60
|
+
*/
|
|
61
|
+
this.calendar = null;
|
|
62
|
+
/**
|
|
63
|
+
* The set of parameters that need to be replaced with the default value format.
|
|
64
|
+
*/
|
|
65
|
+
this.defaultValueFormatSet = new Set();
|
|
66
|
+
/**
|
|
67
|
+
* Map of variable within the plotly data to type.
|
|
68
|
+
* For example, '0/value' -> 'int'
|
|
69
|
+
*/
|
|
70
|
+
this.dataTypeMap = new Map();
|
|
71
|
+
this.getTimeZone = memoize((columnType, formatter) => {
|
|
72
|
+
if (formatter != null) {
|
|
73
|
+
const dataFormatter = formatter.getColumnTypeFormatter(columnType);
|
|
74
|
+
if (dataFormatter != null) {
|
|
75
|
+
return dataFormatter.dhTimeZone;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return undefined;
|
|
79
|
+
});
|
|
80
|
+
this.getValueTranslator = memoize((columnType, formatter) => {
|
|
81
|
+
const timeZone = this.getTimeZone(columnType, formatter);
|
|
82
|
+
return (value) => this.chartUtils.unwrapValue(value, timeZone);
|
|
83
|
+
});
|
|
84
|
+
this.widget = widget;
|
|
85
|
+
this.refetch = refetch;
|
|
86
|
+
this.chartUtils = new ChartUtils(dh);
|
|
87
|
+
this.handleFigureUpdated = this.handleFigureUpdated.bind(this);
|
|
88
|
+
this.handleWidgetUpdated = this.handleWidgetUpdated.bind(this);
|
|
89
|
+
const widgetData = getWidgetData(widget);
|
|
90
|
+
// Chart only fetches the model layout once on init, so it needs to be set
|
|
91
|
+
// before the widget is subscribed to.
|
|
92
|
+
this.updateLayout(widgetData);
|
|
93
|
+
// The calendar is only fetched once at init.
|
|
94
|
+
this.updateCalendar(widgetData);
|
|
95
|
+
this.setTitle(this.getDefaultTitle());
|
|
96
|
+
}
|
|
97
|
+
getData() {
|
|
98
|
+
const hydratedData = [...this.plotlyData];
|
|
99
|
+
this.tableColumnReplacementMap.forEach((columnReplacements, tableId) => {
|
|
100
|
+
const tableData = this.tableDataMap.get(tableId);
|
|
101
|
+
if (tableData == null) {
|
|
102
|
+
throw new Error(`No tableData for table ID ${tableId}`);
|
|
103
|
+
}
|
|
104
|
+
// Replace placeholder arrays with actual data
|
|
105
|
+
columnReplacements.forEach((paths, columnName) => {
|
|
106
|
+
paths.forEach(destination => {
|
|
107
|
+
var _a, _b, _c;
|
|
108
|
+
// The JSON pointer starts w/ /plotly/data and we don't need that part
|
|
109
|
+
const parts = getPathParts(destination);
|
|
110
|
+
const single = isSingleValue(hydratedData, parts);
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
let selector = hydratedData;
|
|
113
|
+
for (let i = 0; i < parts.length; i += 1) {
|
|
114
|
+
if (i !== parts.length - 1) {
|
|
115
|
+
selector = selector[parts[i]];
|
|
116
|
+
}
|
|
117
|
+
else if (single) {
|
|
118
|
+
selector[parts[i]] = (_b = (_a = tableData[columnName]) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
selector[parts[i]] = (_c = tableData[columnName]) !== null && _c !== void 0 ? _c : [];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return hydratedData;
|
|
128
|
+
}
|
|
129
|
+
getLayout() {
|
|
130
|
+
return this.layout;
|
|
131
|
+
}
|
|
132
|
+
close() {
|
|
133
|
+
var _a;
|
|
134
|
+
super.close();
|
|
135
|
+
(_a = this.widget) === null || _a === void 0 ? void 0 : _a.close();
|
|
136
|
+
this.widget = undefined;
|
|
137
|
+
}
|
|
138
|
+
async subscribe(callback) {
|
|
139
|
+
if (this.isSubscribed) {
|
|
140
|
+
log.debug('already subscribed');
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
log.debug('subscribing');
|
|
144
|
+
super.subscribe(callback);
|
|
145
|
+
if (this.widget == null) {
|
|
146
|
+
this.widget = await this.refetch();
|
|
147
|
+
}
|
|
148
|
+
const widgetData = getWidgetData(this.widget);
|
|
149
|
+
this.handleWidgetUpdated(widgetData, this.widget.exportedObjects);
|
|
150
|
+
this.isSubscribed = true;
|
|
151
|
+
this.widgetUnsubscribe = this.widget.addEventListener(this.dh.Widget.EVENT_MESSAGE, ({ detail }) => {
|
|
152
|
+
this.handleWidgetUpdated(JSON.parse(detail.getDataAsString()), detail.exportedObjects);
|
|
153
|
+
});
|
|
154
|
+
this.tableReferenceMap.forEach((_, id) => this.subscribeTable(id));
|
|
155
|
+
// If there are no tables to fetch data from, the chart is ready to render
|
|
156
|
+
// Normally this event only fires once at least 1 table has fetched data
|
|
157
|
+
// Without this, the chart shows an infinite loader if there are no tables
|
|
158
|
+
if (this.tableColumnReplacementMap.size === 0) {
|
|
159
|
+
this.fireUpdate(this.getData());
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
unsubscribe(callback) {
|
|
163
|
+
var _a, _b;
|
|
164
|
+
if (!this.isSubscribed) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
super.unsubscribe(callback);
|
|
168
|
+
(_a = this.widgetUnsubscribe) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
169
|
+
this.isSubscribed = false;
|
|
170
|
+
this.tableReferenceMap.forEach((_, id) => this.removeTable(id));
|
|
171
|
+
(_b = this.widget) === null || _b === void 0 ? void 0 : _b.close();
|
|
172
|
+
this.widget = undefined;
|
|
173
|
+
}
|
|
174
|
+
setRenderOptions(renderOptions) {
|
|
175
|
+
var _a;
|
|
176
|
+
this.handleWebGlAllowed(renderOptions.webgl, (_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.webgl);
|
|
177
|
+
super.setRenderOptions(renderOptions);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Handle the WebGL option being set in the render options.
|
|
181
|
+
* If WebGL is enabled, traces have their original types as given.
|
|
182
|
+
* If WebGL is disabled, replace traces that require WebGL with non-WebGL traces if possible.
|
|
183
|
+
* Also, show a dismissible warning per-chart if there are WebGL traces that cannot be replaced.
|
|
184
|
+
* @param webgl The new WebGL value. True if WebGL is enabled.
|
|
185
|
+
* @param prevWebgl The previous WebGL value
|
|
186
|
+
*/
|
|
187
|
+
handleWebGlAllowed(webgl = true, prevWebgl = true) {
|
|
188
|
+
setWebGlTraceType(this.plotlyData, webgl && this.isWebGlSupported, this.webGlTraceIndices);
|
|
189
|
+
const needsBlocker = hasUnreplaceableWebGlTraces(this.plotlyData);
|
|
190
|
+
// If WebGL is disabled and there are traces that require WebGL, show a warning that is dismissible on a per-chart basis
|
|
191
|
+
if (needsBlocker && !webgl && !this.hasAcknowledgedWebGlWarning) {
|
|
192
|
+
this.fireBlocker([
|
|
193
|
+
'WebGL is disabled but this chart cannot render without it. Check the Advanced section in the settings to enable WebGL or click below to render with WebGL for this chart.',
|
|
194
|
+
]);
|
|
195
|
+
}
|
|
196
|
+
else if (webgl && !prevWebgl && needsBlocker) {
|
|
197
|
+
// clear the blocker but not the acknowledged flag in case WebGL is disabled again
|
|
198
|
+
this.fireBlockerClear(false);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
fireBlockerClear(isAcknowledged = true) {
|
|
202
|
+
super.fireBlockerClear();
|
|
203
|
+
this.hasAcknowledgedWebGlWarning =
|
|
204
|
+
isAcknowledged || this.hasAcknowledgedWebGlWarning;
|
|
205
|
+
}
|
|
206
|
+
updateLayout(data) {
|
|
207
|
+
const { figure } = data;
|
|
208
|
+
const { plotly } = figure;
|
|
209
|
+
const { layout: plotlyLayout = {} } = plotly;
|
|
210
|
+
// @deephaven/chart Chart component mutates the layout
|
|
211
|
+
// If we want updates like the zoom range, we must only set the layout once on init
|
|
212
|
+
// The title is currently the only thing that can be updated after init
|
|
213
|
+
if (Object.keys(this.layout).length > 0) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
this.layout = Object.assign({}, plotlyLayout);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Check if the timezone has changed in the new formatter
|
|
220
|
+
* @param formatter The new formatter
|
|
221
|
+
* @returns True if the timezone has changed
|
|
222
|
+
*/
|
|
223
|
+
timeZoneChanged(formatter) {
|
|
224
|
+
var _a, _b, _c;
|
|
225
|
+
const timeZone = (_b = (_a = this.formatter) === null || _a === void 0 ? void 0 : _a.getColumnTypeFormatter('datetime')) === null || _b === void 0 ? void 0 : _b.dhTimeZone.id;
|
|
226
|
+
const newTimeZone = (_c = formatter.getColumnTypeFormatter('datetime')) === null || _c === void 0 ? void 0 : _c.dhTimeZone.id;
|
|
227
|
+
return timeZone !== newTimeZone && newTimeZone != null;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Update the calendar object from the data
|
|
231
|
+
* @param data The new data to update the calendar from
|
|
232
|
+
*/
|
|
233
|
+
updateCalendar(data) {
|
|
234
|
+
const { calendar } = data.figure.deephaven;
|
|
235
|
+
if (calendar != null) {
|
|
236
|
+
// Timezone must be replaced for accurate rangebreaks.
|
|
237
|
+
const timeZone = this.dh.i18n.TimeZone.getTimeZone(calendar.timeZone);
|
|
238
|
+
this.calendar = Object.assign(Object.assign({}, calendar), { timeZone, holidays: calendar.holidays.map((holiday, i) => {
|
|
239
|
+
const { date } = holiday;
|
|
240
|
+
// date is a really a string at this point, but it should be a LocalDate object
|
|
241
|
+
const dateObj = new Date(date);
|
|
242
|
+
const year = dateObj.getFullYear();
|
|
243
|
+
const month = dateObj.getMonth();
|
|
244
|
+
const day = dateObj.getDate();
|
|
245
|
+
return Object.assign(Object.assign({}, holiday), { date: {
|
|
246
|
+
valueOf: () => date,
|
|
247
|
+
getYear: () => year,
|
|
248
|
+
getMonthValue: () => month,
|
|
249
|
+
getDayOfMonth: () => day,
|
|
250
|
+
toString: () => date,
|
|
251
|
+
} });
|
|
252
|
+
}) });
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Fire an event to update the rangebreaks on the chart.
|
|
257
|
+
* @param formatter The formatter to use to set the rangebreaks. If not provided, the current formatter is used.
|
|
258
|
+
*/
|
|
259
|
+
fireRangebreaksUpdated(formatter = this.formatter) {
|
|
260
|
+
if (!formatter) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const layoutUpdate = setRangebreaksFromCalendar(formatter, this.calendar, this.layout, this.chartUtils);
|
|
264
|
+
if (layoutUpdate) {
|
|
265
|
+
this.fireLayoutUpdated(layoutUpdate);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Unsubscribe from a table.
|
|
270
|
+
* @param id The table ID to unsubscribe from
|
|
271
|
+
*/
|
|
272
|
+
unsubscribeTable(id) {
|
|
273
|
+
var _a;
|
|
274
|
+
(_a = this.tableSubscriptionMap.get(id)) === null || _a === void 0 ? void 0 : _a.close();
|
|
275
|
+
this.tableSubscriptionMap.delete(id);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Fire an event to update the timezone on the chart data if it has changed.
|
|
279
|
+
* @param formatter The new formatter
|
|
280
|
+
*/
|
|
281
|
+
fireTimeZoneUpdated() {
|
|
282
|
+
this.tableDataMap.forEach((_, tableId) => {
|
|
283
|
+
const table = this.tableReferenceMap.get(tableId);
|
|
284
|
+
if (table) {
|
|
285
|
+
// resubscribe to get the data with the new timezone
|
|
286
|
+
this.unsubscribeTable(tableId);
|
|
287
|
+
this.subscribeTable(tableId);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
this.fireUpdate(this.getData());
|
|
291
|
+
}
|
|
292
|
+
setFormatter(formatter) {
|
|
293
|
+
setDefaultValueFormat(this.plotlyData, this.defaultValueFormatSet, this.dataTypeMap, formatter);
|
|
294
|
+
// Only update if isSubscribed because otherwise the events are unnecessary and buggy
|
|
295
|
+
if (this.isSubscribed && this.timeZoneChanged(formatter)) {
|
|
296
|
+
this.fireRangebreaksUpdated(formatter);
|
|
297
|
+
this.fireTimeZoneUpdated();
|
|
298
|
+
}
|
|
299
|
+
super.setFormatter(formatter);
|
|
300
|
+
}
|
|
301
|
+
handleWidgetUpdated(data, references) {
|
|
302
|
+
var _a, _b, _c, _d;
|
|
303
|
+
log.debug('handleWidgetUpdated', data, references);
|
|
304
|
+
const { figure, new_references: newReferences, removed_references: removedReferences, } = data;
|
|
305
|
+
const { plotly, deephaven } = figure;
|
|
306
|
+
const { layout: plotlyLayout = {} } = plotly;
|
|
307
|
+
this.tableColumnReplacementMap = getDataMappings(data);
|
|
308
|
+
this.plotlyData = plotly.data;
|
|
309
|
+
if (!deephaven.is_user_set_template) {
|
|
310
|
+
removeColorsFromData((_c = (_b = (_a = plotlyLayout === null || plotlyLayout === void 0 ? void 0 : plotlyLayout.template) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.colorway) !== null && _c !== void 0 ? _c : [], this.plotlyData);
|
|
311
|
+
}
|
|
312
|
+
this.defaultValueFormatSet = replaceValueFormat(this.plotlyData);
|
|
313
|
+
// Retrieve the indexes of traces that require WebGL so they can be replaced if WebGL is disabled
|
|
314
|
+
this.webGlTraceIndices = getReplaceableWebGlTraceIndices(this.plotlyData);
|
|
315
|
+
this.handleWebGlAllowed((_d = this.renderOptions) === null || _d === void 0 ? void 0 : _d.webgl);
|
|
316
|
+
this.fireRangebreaksUpdated();
|
|
317
|
+
newReferences.forEach(async (id, i) => {
|
|
318
|
+
this.tableDataMap.set(id, {}); // Plot may render while tables are being fetched. Set this to avoid a render error
|
|
319
|
+
const table = (await references[i].fetch());
|
|
320
|
+
this.addTable(id, table).then(() => {
|
|
321
|
+
// The data type map requires the table to be added to the reference map
|
|
322
|
+
this.dataTypeMap = getDataTypeMap(deephaven, this.tableReferenceMap);
|
|
323
|
+
setDefaultValueFormat(this.plotlyData, this.defaultValueFormatSet, this.dataTypeMap, this.formatter);
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
removedReferences.forEach(id => this.removeTable(id));
|
|
327
|
+
// title is the only thing expected to be updated after init from the layout
|
|
328
|
+
if (typeof plotlyLayout.title === 'object' &&
|
|
329
|
+
plotlyLayout.title.text != null) {
|
|
330
|
+
this.fireLayoutUpdated({ title: plotlyLayout.title });
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
handleFigureUpdated(event, tableId) {
|
|
334
|
+
const chartData = this.chartDataMap.get(tableId);
|
|
335
|
+
const tableData = this.tableDataMap.get(tableId);
|
|
336
|
+
if (chartData == null) {
|
|
337
|
+
log.warn('Unknown chartData for this event. Skipping update');
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
if (tableData == null) {
|
|
341
|
+
log.warn('No tableData for this event. Skipping update');
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const { detail: figureUpdateEvent } = event;
|
|
345
|
+
chartData.update(figureUpdateEvent);
|
|
346
|
+
figureUpdateEvent.columns.forEach(column => {
|
|
347
|
+
const valueTranslator = this.getValueTranslator(column.type, this.formatter);
|
|
348
|
+
const columnData = chartData.getColumn(column.name, valueTranslator, figureUpdateEvent);
|
|
349
|
+
tableData[column.name] = columnData;
|
|
350
|
+
});
|
|
351
|
+
if (this.isPaused) {
|
|
352
|
+
this.hasPendingUpdate = true;
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
this.fireUpdate(this.getData());
|
|
356
|
+
}
|
|
357
|
+
async addTable(id, table) {
|
|
358
|
+
if (this.tableReferenceMap.has(id)) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
let tableToAdd = table;
|
|
362
|
+
const downsampleInfo = this.getDownsampleInfo(id, table);
|
|
363
|
+
const needsDownsample = table.size > PlotlyExpressChartModel.AUTO_DOWNSAMPLE_SIZE;
|
|
364
|
+
const canDownsample = typeof downsampleInfo !== 'string';
|
|
365
|
+
const canFetch = PlotlyExpressChartModel.canFetch(table);
|
|
366
|
+
const shouldDownsample = needsDownsample && !this.isDownsamplingDisabled;
|
|
367
|
+
if (!canDownsample) {
|
|
368
|
+
if (!canFetch) {
|
|
369
|
+
log.debug(`Table ${id} too big to fetch ${table.size} items`);
|
|
370
|
+
this.fireDownsampleFail(`Too many items to plot: ${Number(table.size).toLocaleString()} items.`);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (shouldDownsample) {
|
|
374
|
+
this.fireDownsampleFail(downsampleInfo);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (canDownsample && needsDownsample) {
|
|
379
|
+
this.downsampleMap.set(id, downsampleInfo);
|
|
380
|
+
try {
|
|
381
|
+
this.fireDownsampleStart(null);
|
|
382
|
+
tableToAdd = await downsample(this.dh, downsampleInfo);
|
|
383
|
+
this.fireDownsampleFinish(null);
|
|
384
|
+
}
|
|
385
|
+
catch (e) {
|
|
386
|
+
this.fireDownsampleFail(e);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
this.tableReferenceMap.set(id, tableToAdd);
|
|
391
|
+
this.tableDataMap.set(id, {});
|
|
392
|
+
if (this.isSubscribed) {
|
|
393
|
+
this.subscribeTable(id);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
async updateDownsampledTable(id) {
|
|
397
|
+
var _a, _b;
|
|
398
|
+
const oldDownsampleInfo = this.downsampleMap.get(id);
|
|
399
|
+
if (oldDownsampleInfo == null) {
|
|
400
|
+
log.error(`No table found for id ${id}`);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const downsampleInfo = this.getDownsampleInfo(id, oldDownsampleInfo.originalTable);
|
|
404
|
+
if (typeof downsampleInfo === 'string') {
|
|
405
|
+
this.fireDownsampleFail(downsampleInfo);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
if (areSameAxisRange(downsampleInfo.range, oldDownsampleInfo.range) &&
|
|
409
|
+
downsampleInfo.width === oldDownsampleInfo.width) {
|
|
410
|
+
log.debug('Range and width are the same, skipping downsample');
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
log.debug('Updating downsampled table', downsampleInfo);
|
|
414
|
+
this.fireDownsampleStart(null);
|
|
415
|
+
(_a = this.subscriptionCleanupMap.get(id)) === null || _a === void 0 ? void 0 : _a();
|
|
416
|
+
(_b = this.tableSubscriptionMap.get(id)) === null || _b === void 0 ? void 0 : _b.close();
|
|
417
|
+
this.subscriptionCleanupMap.delete(id);
|
|
418
|
+
this.tableSubscriptionMap.delete(id);
|
|
419
|
+
this.tableReferenceMap.delete(id);
|
|
420
|
+
this.addTable(id, oldDownsampleInfo.originalTable);
|
|
421
|
+
}
|
|
422
|
+
setDownsamplingDisabled(isDownsamplingDisabled) {
|
|
423
|
+
this.isDownsamplingDisabled = isDownsamplingDisabled;
|
|
424
|
+
if (isDownsamplingDisabled && this.widget != null) {
|
|
425
|
+
const widgetData = getWidgetData(this.widget);
|
|
426
|
+
this.handleWidgetUpdated(widgetData, this.widget.exportedObjects);
|
|
427
|
+
this.fireDownsampleFinish(null);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Gets info on how to downsample a table for plotting.
|
|
432
|
+
* @param tableId The tableId to get downsample info for
|
|
433
|
+
* @param table The table to get downsample info for
|
|
434
|
+
* @returns DownsampleInfo if table can be downsampled.
|
|
435
|
+
* A string of the reason if the table cannot be downsampled.
|
|
436
|
+
* Null if the table does not need downsampling.
|
|
437
|
+
*/
|
|
438
|
+
getDownsampleInfo(tableId, table) {
|
|
439
|
+
var _a, _b, _c;
|
|
440
|
+
const downsampleFailMessage = `Plotting ${Number(table.size).toLocaleString()} items may be slow.\nAre you sure you want to continue?`;
|
|
441
|
+
const replacementMap = this.tableColumnReplacementMap.get(tableId);
|
|
442
|
+
if (!replacementMap) {
|
|
443
|
+
return 'Nothing to downsample';
|
|
444
|
+
}
|
|
445
|
+
const areAllLines = [...replacementMap.values()]
|
|
446
|
+
.flat()
|
|
447
|
+
.map(path => getPathParts(path)[0])
|
|
448
|
+
.every(seriesIndex => {
|
|
449
|
+
const series = this.plotlyData[parseInt(seriesIndex, 10)];
|
|
450
|
+
return series != null && isLineSeries(series);
|
|
451
|
+
});
|
|
452
|
+
if (!areAllLines) {
|
|
453
|
+
log.debug('Cannot downsample non-line series');
|
|
454
|
+
return downsampleFailMessage;
|
|
455
|
+
}
|
|
456
|
+
let xCol = '';
|
|
457
|
+
let xAxis;
|
|
458
|
+
const yCols = [];
|
|
459
|
+
const replacementEntries = [...replacementMap.entries()];
|
|
460
|
+
for (let i = 0; i < replacementEntries.length; i += 1) {
|
|
461
|
+
const [columnName, paths] = replacementEntries[i];
|
|
462
|
+
const pathParts = paths.map(getPathParts);
|
|
463
|
+
for (let j = 0; j < pathParts.length; j += 1) {
|
|
464
|
+
const [seriesIdx, xOrY] = pathParts[j];
|
|
465
|
+
const series = this.plotlyData[parseInt(seriesIdx, 10)];
|
|
466
|
+
if (xOrY === 'x') {
|
|
467
|
+
if (xCol !== '' && columnName !== xCol) {
|
|
468
|
+
log.debug('Cannot downsample multiple x columns');
|
|
469
|
+
return downsampleFailMessage;
|
|
470
|
+
}
|
|
471
|
+
xCol = columnName;
|
|
472
|
+
const axisName = `${series.xaxis[0]}axis${(_a = series.xaxis[1]) !== null && _a !== void 0 ? _a : ''}`;
|
|
473
|
+
xAxis = this.layout[axisName]; // The cast makes TS happy
|
|
474
|
+
if (xAxis != null && !isLinearAxis(xAxis) && !isAutoAxis(xAxis)) {
|
|
475
|
+
return 'Cannot downsample non-linear x axis';
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
yCols.push(columnName);
|
|
480
|
+
const axisName = `${series.yaxis[0]}axis${(_b = series.yaxis[1]) !== null && _b !== void 0 ? _b : ''}`;
|
|
481
|
+
const yAxis = this.layout[axisName]; // The cast makes TS happy
|
|
482
|
+
if (yAxis != null && !isLinearAxis(yAxis) && !isAutoAxis(yAxis)) {
|
|
483
|
+
return 'Cannot downsample non-linear y axis';
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
if (xAxis == null) {
|
|
489
|
+
return 'Cannot downsample without an x axis';
|
|
490
|
+
}
|
|
491
|
+
// Copy the range in case plotly mutates it
|
|
492
|
+
const range = xAxis.autorange === false ? [...((_c = xAxis.range) !== null && _c !== void 0 ? _c : [])] : null;
|
|
493
|
+
return {
|
|
494
|
+
type: 'linear',
|
|
495
|
+
originalTable: table,
|
|
496
|
+
xCol,
|
|
497
|
+
yCols,
|
|
498
|
+
width: this.getPlotWidth(),
|
|
499
|
+
range,
|
|
500
|
+
rangeType: xAxis.type === 'date' ? 'date' : 'number',
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
subscribeTable(id) {
|
|
504
|
+
const table = this.tableReferenceMap.get(id);
|
|
505
|
+
const columnReplacements = this.tableColumnReplacementMap.get(id);
|
|
506
|
+
if (table != null &&
|
|
507
|
+
columnReplacements != null &&
|
|
508
|
+
columnReplacements.size > 0 &&
|
|
509
|
+
!this.tableSubscriptionMap.has(id)) {
|
|
510
|
+
this.chartDataMap.set(id, new this.dh.plot.ChartData(table));
|
|
511
|
+
const columnNames = new Set(columnReplacements.keys());
|
|
512
|
+
const columns = table.columns.filter(({ name }) => columnNames.has(name));
|
|
513
|
+
const subscription = table.subscribe(columns);
|
|
514
|
+
this.tableSubscriptionMap.set(id, subscription);
|
|
515
|
+
this.subscriptionCleanupMap.set(id, subscription.addEventListener(this.dh.Table.EVENT_UPDATED, e => this.handleFigureUpdated(e, id)));
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
removeTable(id) {
|
|
519
|
+
var _a, _b;
|
|
520
|
+
(_a = this.subscriptionCleanupMap.get(id)) === null || _a === void 0 ? void 0 : _a();
|
|
521
|
+
(_b = this.tableSubscriptionMap.get(id)) === null || _b === void 0 ? void 0 : _b.close();
|
|
522
|
+
this.tableReferenceMap.delete(id);
|
|
523
|
+
this.downsampleMap.delete(id);
|
|
524
|
+
this.subscriptionCleanupMap.delete(id);
|
|
525
|
+
this.tableSubscriptionMap.delete(id);
|
|
526
|
+
this.chartDataMap.delete(id);
|
|
527
|
+
this.tableDataMap.delete(id);
|
|
528
|
+
this.tableColumnReplacementMap.delete(id);
|
|
529
|
+
}
|
|
530
|
+
fireUpdate(data) {
|
|
531
|
+
super.fireUpdate(data);
|
|
532
|
+
this.hasPendingUpdate = false;
|
|
533
|
+
// TODO: This will fire on first call to `fireUpdate` even though other data
|
|
534
|
+
// may still be loading. We should consider making this smarter to fire after
|
|
535
|
+
// all initial data has loaded.
|
|
536
|
+
// https://github.com/deephaven/deephaven-plugins/issues/267
|
|
537
|
+
// If not subscribed, the fireLoadFinished will not go through since there is no listeners
|
|
538
|
+
// which results in a loading spinner that does not go away on its own
|
|
539
|
+
// isSubscribed can also be checked before calling fireUpdate, but this is a
|
|
540
|
+
// subtle bug that is good to check for here just in case
|
|
541
|
+
if (!this.hasInitialLoadCompleted && this.isSubscribed) {
|
|
542
|
+
this.fireLoadFinished();
|
|
543
|
+
this.hasInitialLoadCompleted = true;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
setDimensions(rect) {
|
|
547
|
+
super.setDimensions(rect);
|
|
548
|
+
ChartUtils.getLayoutRanges(this.layout);
|
|
549
|
+
this.downsampleMap.forEach((_, id) => {
|
|
550
|
+
this.updateDownsampledTable(id);
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
pauseUpdates() {
|
|
554
|
+
this.isPaused = true;
|
|
555
|
+
}
|
|
556
|
+
resumeUpdates() {
|
|
557
|
+
this.isPaused = false;
|
|
558
|
+
if (this.hasPendingUpdate) {
|
|
559
|
+
this.fireUpdate(this.getData());
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
shouldPauseOnUserInteraction() {
|
|
563
|
+
return (this.hasScene() || this.hasGeo() || this.hasMapbox() || this.hasPolar());
|
|
564
|
+
}
|
|
565
|
+
hasScene() {
|
|
566
|
+
return this.plotlyData.some(d => 'scene' in d && d.scene != null);
|
|
567
|
+
}
|
|
568
|
+
hasGeo() {
|
|
569
|
+
return this.plotlyData.some(d => 'geo' in d && d.geo != null);
|
|
570
|
+
}
|
|
571
|
+
hasMapbox() {
|
|
572
|
+
return this.plotlyData.some(({ type }) => type === null || type === void 0 ? void 0 : type.includes('mapbox'));
|
|
573
|
+
}
|
|
574
|
+
hasPolar() {
|
|
575
|
+
return this.plotlyData.some(({ type }) => type === null || type === void 0 ? void 0 : type.includes('polar'));
|
|
576
|
+
}
|
|
577
|
+
getPlotWidth() {
|
|
578
|
+
var _a, _b, _c, _d;
|
|
579
|
+
if (!this.rect || !this.rect.width) {
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
582
|
+
return Math.max(this.rect.width -
|
|
583
|
+
((_b = (_a = this.layout.margin) === null || _a === void 0 ? void 0 : _a.l) !== null && _b !== void 0 ? _b : 0) -
|
|
584
|
+
((_d = (_c = this.layout.margin) === null || _c === void 0 ? void 0 : _c.r) !== null && _d !== void 0 ? _d : 0), 0);
|
|
585
|
+
}
|
|
586
|
+
getPlotHeight() {
|
|
587
|
+
var _a, _b, _c, _d;
|
|
588
|
+
if (!this.rect || !this.rect.height) {
|
|
589
|
+
return 0;
|
|
590
|
+
}
|
|
591
|
+
return Math.max(this.rect.height -
|
|
592
|
+
((_b = (_a = this.layout.margin) === null || _a === void 0 ? void 0 : _a.t) !== null && _b !== void 0 ? _b : 0) -
|
|
593
|
+
((_d = (_c = this.layout.margin) === null || _c === void 0 ? void 0 : _c.b) !== null && _d !== void 0 ? _d : 0), 0);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* The size at which the chart will automatically downsample the data if it can be downsampled.
|
|
598
|
+
* If it cannot be downsampled, but the size is below MAX_FETCH_SIZE,
|
|
599
|
+
* the chart will show a confirmation to fetch the data since it might be a slow operation.
|
|
600
|
+
*/
|
|
601
|
+
PlotlyExpressChartModel.AUTO_DOWNSAMPLE_SIZE = 30000;
|
|
602
|
+
/**
|
|
603
|
+
* The maximum number of items that can be fetched from a table.
|
|
604
|
+
* If a table is larger than this, the chart will not be fetched.
|
|
605
|
+
* This is to prevent the chart from fetching too much data and crashing the browser.
|
|
606
|
+
*/
|
|
607
|
+
PlotlyExpressChartModel.MAX_FETCH_SIZE = 1000000;
|
|
608
|
+
export default PlotlyExpressChartModel;
|
|
609
|
+
//# sourceMappingURL=PlotlyExpressChartModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlotlyExpressChartModel.js","sourceRoot":"","sources":["../src/PlotlyExpressChartModel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,GAAG,MAAM,gBAAgB,CAAC;AAEjC,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,EAGL,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,+BAA+B,EAC/B,aAAa,EACb,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,oBAAoB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;GAIG;AACI,sCAAc,GAAG,OAAS,CAAC;AA8yBpC,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { dh } from '@deephaven/jsapi-types';
|
|
2
|
+
import { type WidgetPanelProps } from '@deephaven/plugin';
|
|
3
|
+
export declare function PlotlyExpressChartPanel(props: WidgetPanelProps<dh.Widget>): JSX.Element;
|
|
4
|
+
export default PlotlyExpressChartPanel;
|
|
5
|
+
//# sourceMappingURL=PlotlyExpressChartPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlotlyExpressChartPanel.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressChartPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,MAAM,CAAC,GACjC,GAAG,CAAC,OAAO,CAyBb;AAED,eAAe,uBAAuB,CAAC"}
|