Skip to content

Commit

Permalink
fix: DH-18538: Deephaven express not respecting webgl flag within dh.…
Browse files Browse the repository at this point in the history
…ui (#1103)
  • Loading branch information
mattrunyon authored Feb 3, 2025
1 parent 9b38e75 commit 4516b77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions plugins/plotly-express/src/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -14,6 +16,7 @@ export function PlotlyExpressChart(
const { fetch } = props;
const containerRef = useRef<HTMLDivElement>(null);
const [model, setModel] = useState<PlotlyExpressChartModel>();
const settings = useSelector(getSettings<RootState>);
const [widgetRevision, setWidgetRevision] = useState(0); // Used to force a clean chart state on widget change

useEffect(() => {
Expand Down Expand Up @@ -42,6 +45,7 @@ export function PlotlyExpressChart(
key={widgetRevision}
containerRef={containerRef}
model={model}
settings={settings}
Plotly={Plotly}
/>
) : null;
Expand Down

0 comments on commit 4516b77

Please sign in to comment.