diff --git a/package-lock.json b/package-lock.json index b05823bd9..cf3069c5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32072,6 +32072,7 @@ "@deephaven/jsapi-bootstrap": "0.97.0", "@deephaven/log": "0.97.0", "@deephaven/plugin": "0.97.0", + "@deephaven/redux": "0.97.0", "@deephaven/utils": "0.97.0", "deep-equal": "^2.2.1", "nanoid": "^5.0.7", @@ -103045,6 +103046,7 @@ "@deephaven/jsapi-types": "1.0.0-dev0.36.1", "@deephaven/log": "0.97.0", "@deephaven/plugin": "0.97.0", + "@deephaven/redux": "0.97.0", "@deephaven/test-utils": "0.97.0", "@deephaven/utils": "0.97.0", "@types/deep-equal": "^1.0.1", diff --git a/plugins/plotly-express/src/js/package.json b/plugins/plotly-express/src/js/package.json index 61c4739ef..76a4f03a8 100644 --- a/plugins/plotly-express/src/js/package.json +++ b/plugins/plotly-express/src/js/package.json @@ -60,6 +60,7 @@ "@deephaven/jsapi-bootstrap": "0.97.0", "@deephaven/log": "0.97.0", "@deephaven/plugin": "0.97.0", + "@deephaven/redux": "0.97.0", "@deephaven/utils": "0.97.0", "deep-equal": "^2.2.1", "nanoid": "^5.0.7", diff --git a/plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx b/plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx index 7a1ccea73..e1a29cb4b 100644 --- a/plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx +++ b/plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx @@ -1,9 +1,11 @@ import React, { useEffect, useRef, useState } from 'react'; +import { useSelector } from 'react-redux'; import Plotly from 'plotly.js-dist-min'; import { Chart } from '@deephaven/chart'; import type { dh } from '@deephaven/jsapi-types'; import { type WidgetComponentProps } from '@deephaven/plugin'; import { useApi } from '@deephaven/jsapi-bootstrap'; +import { getSettings, type RootState } from '@deephaven/redux'; import PlotlyExpressChartModel from './PlotlyExpressChartModel.js'; import { useHandleSceneTicks } from './useHandleSceneTicks.js'; @@ -14,6 +16,7 @@ export function PlotlyExpressChart( const { fetch } = props; const containerRef = useRef(null); const [model, setModel] = useState(); + const settings = useSelector(getSettings); const [widgetRevision, setWidgetRevision] = useState(0); // Used to force a clean chart state on widget change useEffect(() => { @@ -42,6 +45,7 @@ export function PlotlyExpressChart( key={widgetRevision} containerRef={containerRef} model={model} + settings={settings} Plotly={Plotly} /> ) : null;