diff --git a/frontend-components/plotly/src/App.tsx b/frontend-components/plotly/src/App.tsx index ef380ed627d..ff40c0ad9ba 100644 --- a/frontend-components/plotly/src/App.tsx +++ b/frontend-components/plotly/src/App.tsx @@ -144,7 +144,7 @@ function App() { date={transformedData.date} cmd={transformedData.cmd} title={transformedData.title} - global={transformedData.globals} + globals={transformedData.globals} info={info} /> ); diff --git a/frontend-components/plotly/src/components/Chart.tsx b/frontend-components/plotly/src/components/Chart.tsx index f52acff397c..d8c59e1b4b6 100644 --- a/frontend-components/plotly/src/components/Chart.tsx +++ b/frontend-components/plotly/src/components/Chart.tsx @@ -23,7 +23,7 @@ export default function Chart({ date, cmd, title, - global, + globals, info, }: { // @ts-ignore @@ -31,21 +31,19 @@ export default function Chart({ date: Date; cmd: string; title: string; - global: any; + globals: any; info?: any; }) { const posthog = usePostHog(); useEffect(() => { if (posthog) posthog.capture("chart", info); - }, [info]); + }, []); delete json.layout.width; delete json.layout.height; json.layout.title.text = ""; - const [globals, setGlobals] = useState(global); - const [barButtons, setModeBarButtons] = useState({}); const [LogYaxis, setLogYaxis] = useState(false); const [chartTitle, setChartTitle] = useState(title); diff --git a/frontend-components/plotly/src/components/Dialogs/TextChartDialog.tsx b/frontend-components/plotly/src/components/Dialogs/TextChartDialog.tsx index d6c0f5afb63..f5ee1b0c994 100644 --- a/frontend-components/plotly/src/components/Dialogs/TextChartDialog.tsx +++ b/frontend-components/plotly/src/components/Dialogs/TextChartDialog.tsx @@ -112,55 +112,58 @@ export default function TextChartDialog({ defaultValue={popUpData?.annotation?.text || newPopupData?.text} > -