@deephaven/js-plugin-plotly-express 0.3.1 → 0.3.2
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/PlotlyExpressChart.d.ts +5 -0
- package/dist/PlotlyExpressChart.d.ts.map +1 -0
- package/dist/PlotlyExpressChart.js +36 -0
- package/dist/PlotlyExpressChart.js.map +1 -0
- package/dist/PlotlyExpressChartModel.d.ts +49 -13
- package/dist/PlotlyExpressChartModel.d.ts.map +1 -1
- package/dist/PlotlyExpressChartModel.js +193 -63
- package/dist/PlotlyExpressChartModel.js.map +1 -1
- package/dist/PlotlyExpressChartPanel.d.ts +2 -9
- package/dist/PlotlyExpressChartPanel.d.ts.map +1 -1
- package/dist/PlotlyExpressChartPanel.js +9 -45
- package/dist/PlotlyExpressChartPanel.js.map +1 -1
- package/dist/PlotlyExpressChartUtils.d.ts +17 -18
- package/dist/PlotlyExpressChartUtils.d.ts.map +1 -1
- package/dist/PlotlyExpressChartUtils.js +7 -10
- package/dist/PlotlyExpressChartUtils.js.map +1 -1
- package/dist/PlotlyExpressPlugin.d.ts +4 -0
- package/dist/PlotlyExpressPlugin.d.ts.map +1 -0
- package/dist/PlotlyExpressPlugin.js +14 -0
- package/dist/PlotlyExpressPlugin.js.map +1 -0
- package/dist/bundle/index.js +81785 -80929
- package/dist/bundle/style.css +639 -1063
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- 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 +13 -11
- package/dist/DashboardPlugin.d.ts +0 -5
- package/dist/DashboardPlugin.d.ts.map +0 -1
- package/dist/DashboardPlugin.js +0 -39
- package/dist/DashboardPlugin.js.map +0 -1
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import type { Data, PlotlyDataLayoutConfig } from 'plotly.js';
|
|
2
|
-
import type {
|
|
3
|
-
export interface PlotlyChartWidget {
|
|
4
|
-
getDataAsBase64(): string;
|
|
5
|
-
exportedObjects: {
|
|
6
|
-
fetch(): Promise<Table>;
|
|
7
|
-
}[];
|
|
8
|
-
addEventListener(type: string, fn: (event: CustomEvent<PlotlyChartWidget>) => () => void): void;
|
|
9
|
-
}
|
|
2
|
+
import type { Widget } from '@deephaven/jsapi-types';
|
|
10
3
|
export interface PlotlyChartWidgetData {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
type: string;
|
|
5
|
+
figure: {
|
|
6
|
+
deephaven: {
|
|
7
|
+
mappings: Array<{
|
|
8
|
+
table: number;
|
|
9
|
+
data_columns: Record<string, string[]>;
|
|
10
|
+
}>;
|
|
11
|
+
is_user_set_template: boolean;
|
|
12
|
+
is_user_set_color: boolean;
|
|
13
|
+
};
|
|
14
|
+
plotly: PlotlyDataLayoutConfig;
|
|
18
15
|
};
|
|
19
|
-
|
|
16
|
+
revision: number;
|
|
17
|
+
new_references: number[];
|
|
18
|
+
removed_references: number[];
|
|
20
19
|
}
|
|
21
|
-
export declare function getWidgetData(widgetInfo:
|
|
22
|
-
export declare function getDataMappings(
|
|
20
|
+
export declare function getWidgetData(widgetInfo: Widget): PlotlyChartWidgetData;
|
|
21
|
+
export declare function getDataMappings(widgetData: PlotlyChartWidgetData): Map<number, Map<string, string[]>>;
|
|
23
22
|
/**
|
|
24
23
|
* Applies the colorway to the data unless the data color is not its default value
|
|
25
24
|
* Data color is not default if the user set the color specifically or the plot type sets it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressChartUtils.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PlotlyExpressChartUtils.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAKrD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,SAAS,EAAE;YACT,QAAQ,EAAE,KAAK,CAAC;gBACd,KAAK,EAAE,MAAM,CAAC;gBACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;aACxC,CAAC,CAAC;YACH,oBAAoB,EAAE,OAAO,CAAC;YAC9B,iBAAiB,EAAE,OAAO,CAAC;SAC5B,CAAC;QACF,MAAM,EAAE,sBAAsB,CAAC;KAChC,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,CAEvE;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,qBAAqB,GAChC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CA0BpC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EAAE,EACxB,IAAI,EAAE,IAAI,EAAE,GACX,IAAI,CAgDN"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { assertNotNull } from '@deephaven/utils';
|
|
2
1
|
import Log from '@deephaven/log';
|
|
3
2
|
const log = Log.module('@deephaven/js-plugin-plotly-express.ChartUtils');
|
|
4
3
|
export function getWidgetData(widgetInfo) {
|
|
5
|
-
return JSON.parse(
|
|
4
|
+
return JSON.parse(widgetInfo.getDataAsString());
|
|
6
5
|
}
|
|
7
|
-
export
|
|
8
|
-
const data =
|
|
9
|
-
|
|
10
|
-
// Maps a table to a map of column name to an array of the paths where its data should be
|
|
6
|
+
export function getDataMappings(widgetData) {
|
|
7
|
+
const data = widgetData.figure;
|
|
8
|
+
// Maps a reference index to a map of column name to an array of the paths where its data should be
|
|
11
9
|
const tableColumnReplacementMap = new Map();
|
|
12
|
-
tables.forEach(table => tableColumnReplacementMap.set(table, new Map()));
|
|
13
10
|
data.deephaven.mappings.forEach(({ table: tableIndex, data_columns: dataColumns }) => {
|
|
14
|
-
|
|
15
|
-
const existingColumnMap = tableColumnReplacementMap.get(
|
|
16
|
-
|
|
11
|
+
var _a;
|
|
12
|
+
const existingColumnMap = (_a = tableColumnReplacementMap.get(tableIndex)) !== null && _a !== void 0 ? _a : new Map();
|
|
13
|
+
tableColumnReplacementMap.set(tableIndex, existingColumnMap);
|
|
17
14
|
// For each { columnName: [replacePaths] } in the object, add to the tableColumnReplacementMap
|
|
18
15
|
Object.entries(dataColumns).forEach(([columnName, paths]) => {
|
|
19
16
|
const existingPaths = existingColumnMap.get(columnName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyExpressChartUtils.js","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"PlotlyExpressChartUtils.js","sourceRoot":"","sources":["../src/PlotlyExpressChartUtils.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,gBAAgB,CAAC;AAEjC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,gDAAgD,CAAC,CAAC;AAoBzE,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,C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AAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;aACjE;SACF;KACF;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlotlyExpressPlugin.d.ts","sourceRoot":"","sources":["../src/PlotlyExpressPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,mBAAmB,CAAC;AAKlE,eAAO,MAAM,mBAAmB,EAAE,YAOjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,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"}
|