import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime"; import { Chart, ChartConfiguration, ChartDataset, TooltipLabelStyle, ChartTypeRegistry } from "chart.js"; export declare class Graph implements ComponentInterface { chart: Chart; config: ChartConfiguration; graphEl: HTMLElement; /** * Emitted when a tooltip is shown over the graph */ fireenjinGraphTooltip: EventEmitter<{ event: { afterBody: any[]; backgroundColor: string; beforeBody: any[]; body: any[]; bodyFontColor: string; bodyFontSize: number; bodySpacing: number; borderColor: string; borderWidth: number; caretPadding: number; caretSize: number; caretX: number; caretY: number; cornerRadius: number; dataPoints: any[]; displayColors: boolean; footer: any[]; footerFontColor: string; footerFontSize: number; footerMarginTop: number; footerSpacing: number; height: number; labelStyle: TooltipLabelStyle; labelTextColors: string[]; legendBackgroundColor: string; opacity: number; title: string[]; titleFontColor: string; titleFontSize: number; titleMarinBottom: number; titleSpacing: number; width: number; x: number; xAlign: number; xPadding: number; y: number; yAlign: number; yPadding: number; }; }>; /** * Emitted when the graph is clicked */ fireenjinGraphClick: EventEmitter<{ event: any; item?: any; }>; /** * The dataset to render graph with */ datasets: ChartDataset[]; /** * The labels for the graph */ labels: string[]; /** * The title of the graph */ name: string; /** * The type of graph to generate */ type: keyof ChartTypeRegistry; /** * Set the list datasets for the graph * @param datasets The datasets to render */ setDatasets(datasets: ChartDataset[]): Promise; /** * Set the list labels for the graph * @param labels The labels for the graph */ setLabels(labels: string[]): Promise; /** * Refresh the graph */ refresh(): Promise; /** * Destroy the ChartJS instance and reset chart on state */ removeChart(): Promise; onGraphClick(event: any, item: any): void; configureGraph(): void; componentDidLoad(): void; render(): any; }