/** * Pie Chart Wrapper Class * * Provides a fluent API for building and manipulating pie charts. */ import { DiagramWrapper } from './diagram-wrapper.js'; import type { PieAST, PieSection } from './types/pie.js'; import type { RenderOptions } from './types/render-options.js'; /** * Options for adding a section */ export interface AddSectionOptions { /** Label for the section */ label: string; /** Value for the section */ value: number; } /** * Query options for finding sections */ export interface FindSectionsQuery { /** Filter by label (exact match) */ label?: string; /** Filter by minimum value */ minValue?: number; /** Filter by maximum value */ maxValue?: number; } /** * Pie chart wrapper class */ export declare class Pie extends DiagramWrapper { private constructor(); /** * Creates an empty pie chart */ static create(): Pie; /** * Creates a Pie wrapper from an existing AST */ static from(ast: PieAST): Pie; /** * Parses Mermaid pie chart syntax into a Pie wrapper * * Note: This is an async method because the underlying parser is async. */ static parse(text: string): Promise; /** * Renders the pie chart to Mermaid syntax */ render(options?: RenderOptions): string; /** * Creates a deep clone of this pie chart */ clone(): Pie; /** * Sets the title of the pie chart */ setTitle(title: string): this; /** * Gets the title of the pie chart */ getTitle(): string | undefined; /** * Removes the title */ removeTitle(): this; /** * Sets whether to show data values */ setShowData(show: boolean): this; /** * Gets whether data values are shown */ getShowData(): boolean; /** * Adds a section to the pie chart */ addSection(label: string, value: number): this; /** * Removes a section by label */ removeSection(label: string): this; /** * Updates a section's value */ updateSection(label: string, value: number): this; /** * Gets a section by label */ getSection(label: string): PieSection | undefined; /** * Gets all sections */ getSections(): PieSection[]; /** * Gets the number of sections */ get sectionCount(): number; /** * Finds sections matching the query */ findSections(query: FindSectionsQuery): PieSection[]; /** * Gets the total value of all sections */ getTotal(): number; /** * Gets the percentage of a section */ getPercentage(label: string): number | undefined; /** * Gets the section with the largest value */ getLargestSection(): PieSection | undefined; /** * Gets the section with the smallest value */ getSmallestSection(): PieSection | undefined; /** * Sets the accessibility title */ setAccTitle(title: string): this; /** * Gets the accessibility title */ getAccTitle(): string | undefined; /** * Sets the accessibility description */ setAccDescr(descr: string): this; /** * Gets the accessibility description */ getAccDescr(): string | undefined; } //# sourceMappingURL=pie.d.ts.map