"use client"; import React from "react"; import { Mermaid } from "./Mermaid"; interface PieSlice { label: string; value: number; } interface DiagramPieProps { data: PieSlice[]; title?: string; caption?: string; id?: string; showShare?: boolean; fontSize?: string; } export const DiagramPie: React.FC = ({ data, title, caption, id, showShare = true, fontSize = "16px", }) => { const pieGraph = `pie ${(data || []).map((slice) => ` "${slice.label}" : ${slice.value}`).join("\n")}`; return (
{caption && (
{caption}
)}
); };