import CommonDialog, { styleDialog } from "../Dialogs/CommonDialog"; import { useState } from "react"; export default function TitleChartDialog({ plotlyData, open, close, defaultTitle, updateTitle, updateAxesTitles, }: { plotlyData?: any; open: boolean; close: () => void; defaultTitle: string; updateTitle: (title: string) => void; updateAxesTitles: (axesTitles: any) => void; }) { const [title, setTitle] = useState(defaultTitle); const yAxes = Object.keys(plotlyData.layout || {}).filter( (k) => k.startsWith("yaxis") && plotlyData.layout[k].range != undefined ); const xAxes = Object.keys(plotlyData.layout || {}).filter( (k) => k.startsWith("xaxis") && plotlyData.layout[k].showticklabels != undefined && plotlyData.layout[k]?.anchor ); const [axesTitles, setAxesTitles] = useState({}); return ( ); }