/** * XY Chart Diagram Wrapper Class * * A unified API for building, mutating, and querying XY chart diagrams. * Provides a fluent interface that wraps the XYChartAST. */ import { DiagramWrapper } from './diagram-wrapper.js'; import type { DataSeries, XAxis, XYChartAST, XYChartOrientation, YAxis } from './types/xychart.js'; import type { RenderOptions } from './types/render-options.js'; /** * Query options for finding series */ export interface FindSeriesQuery { /** Find series of this type */ type?: 'line' | 'bar'; /** Find series with this label */ label?: string; /** Find series whose label contains this string */ labelContains?: string; } /** * A fluent wrapper for XYChartAST that supports building, mutating, and querying. */ export declare class XYChart extends DiagramWrapper { private constructor(); /** * Create a new empty XY chart diagram * @param orientation - Optional chart orientation (vertical or horizontal) */ static create(orientation?: XYChartOrientation): XYChart; /** * Create an XYChart wrapper from an existing AST */ static from(ast: XYChartAST): XYChart; /** * Parse Mermaid syntax and create an XYChart wrapper */ static parse(text: string): XYChart; /** * Render to Mermaid syntax */ render(options?: RenderOptions): string; /** * Create a deep clone of this chart */ clone(): XYChart; /** * Get chart title */ get title(): string | undefined; /** * Get chart orientation */ get orientation(): XYChartOrientation | undefined; /** * Get X-axis configuration */ get xAxis(): XAxis | undefined; /** * Get Y-axis configuration */ get yAxis(): YAxis | undefined; /** * Get all data series */ get series(): DataSeries[]; /** * Get number of series */ get seriesCount(): number; /** * Get accessibility title */ get accTitle(): string | undefined; /** * Get accessibility description */ get accDescription(): string | undefined; /** * Set chart title */ setTitle(title: string): this; /** * Remove chart title */ removeTitle(): this; /** * Set chart orientation */ setOrientation(orientation: XYChartOrientation): this; /** * Remove chart orientation (defaults to vertical) */ removeOrientation(): this; /** * Set accessibility title */ setAccessibilityTitle(title: string): this; /** * Remove accessibility title */ removeAccessibilityTitle(): this; /** * Set accessibility description */ setAccessibilityDescription(description: string): this; /** * Remove accessibility description */ removeAccessibilityDescription(): this; /** * Set X-axis with categorical bands * @param categories - Array of category labels * @param title - Optional axis title */ setXAxisBand(categories: string[], title?: string): this; /** * Set X-axis with numeric range * @param min - Minimum value * @param max - Maximum value * @param title - Optional axis title */ setXAxisRange(min: number, max: number, title?: string): this; /** * Set X-axis title (preserves existing axis configuration) */ setXAxisTitle(title: string): this; /** * Remove X-axis title */ removeXAxisTitle(): this; /** * Remove X-axis entirely */ removeXAxis(): this; /** * Set Y-axis with numeric range * @param min - Minimum value * @param max - Maximum value * @param title - Optional axis title */ setYAxisRange(min: number, max: number, title?: string): this; /** * Set Y-axis title (preserves existing axis configuration) */ setYAxisTitle(title: string): this; /** * Remove Y-axis title */ removeYAxisTitle(): this; /** * Remove Y-axis entirely */ removeYAxis(): this; /** * Add a line series * @param values - Array of numeric values * @param label - Optional series label */ addLineSeries(values: number[], label?: string): this; /** * Add a bar series * @param values - Array of numeric values * @param label - Optional series label */ addBarSeries(values: number[], label?: string): this; /** * Remove a series by index */ removeSeries(index: number): this; /** * Remove series by label */ removeSeriesByLabel(label: string): this; /** * Clear all series */ clearSeries(): this; /** * Set series label */ setSeriesLabel(index: number, label: string): this; /** * Set series values */ setSeriesValues(index: number, values: number[]): this; /** * Set series type */ setSeriesType(index: number, type: 'line' | 'bar'): this; /** * Get a series by index */ getSeries(index: number): DataSeries | undefined; /** * Find series matching a query */ findSeries(query: FindSeriesQuery): DataSeries[]; /** * Get all line series */ getLineSeries(): DataSeries[]; /** * Get all bar series */ getBarSeries(): DataSeries[]; /** * Check if X-axis is band (categorical) */ isXAxisBand(): boolean; /** * Check if X-axis is range (numeric) */ isXAxisRange(): boolean; /** * Get X-axis categories (if band type) */ getXAxisCategories(): string[] | undefined; /** * Get X-axis range (if range type) */ getXAxisRange(): { min: number; max: number; } | undefined; /** * Get Y-axis range */ getYAxisRange(): { min: number; max: number; } | undefined; } //# sourceMappingURL=xychart.d.ts.map