dashboard opt

This commit is contained in:
qixinbo
2026-03-17 11:47:30 +08:00
parent 4bbecabc20
commit 4b7d8b7b9c
4 changed files with 77 additions and 5 deletions
@@ -20,6 +20,16 @@ export function VisualizationPanel() {
const buildPendingChart = (): Omit<ChartConfig, 'layout'> | null => {
if (!currentData || !currentSQL) return null;
if (view === "table") {
return {
id: Date.now().toString(),
title: currentChartSpec?.title || 'Generated Analysis',
type: "table",
data: currentData,
sql: currentSQL,
chartSpec: null,
};
}
const mark = currentChartSpec?.mark;
const markType = typeof mark === "string" ? mark : mark?.type;
const dashboardType = markType === "line" ? "line" : "bar";