diff --git a/go/jsruntime/uikit/Chart.tsx b/go/jsruntime/uikit/Chart.tsx index 90bec626..c6c12d8d 100644 --- a/go/jsruntime/uikit/Chart.tsx +++ b/go/jsruntime/uikit/Chart.tsx @@ -885,8 +885,7 @@ function Legend(p: { props: ChartProps; legend: ChartLegend | null; colorOf: (i: // row under the plot. An explicit ChartLegend picks the row/column axis (orientation) // and where along it the legend sits (position). const containerClass = () => { - const cfg = p.legend; - if (!cfg) return "mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5"; + const cfg = p.legend ?? {orientation: "horizontal", position: "bottom-center"}; if (cfg.orientation === "vertical") { const justify = cfg.position.startsWith("top") ? "justify-start" : cfg.position.startsWith("bottom") ? "justify-end" : "justify-center";