import { Event } from "survey-core"; import { SelectBase } from "../selectBase"; import { IAnswersData, VisualizerBase } from "../visualizerBase"; import { NumberModel } from "../number"; import { DashboardTheme } from "../theme"; import "./styles.scss"; export interface ChartJsOptions { type: string; data: { labels: string[]; datasets: any[]; }; options: any; height?: number; hasSeries?: boolean; pieSeries?: Array<{ data: number[]; labels: string[]; title: string; colors: string[]; }>; } export declare class ChartJsSetup { static imageExportFormat: string; static defaultChartHeight: number; static defaultBarGap: number; static onImageSaving: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>; static onChartCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>; static parseFontSize(size: string): number; static defaultDataLabelsConfig(theme: DashboardTheme): { anchor: string; align: string; textAlign: string; offset: number; backgroundColor: any; color: string; textShadowColor: string; font: { size: number; family: string; weight: number; }; }; static dataLabelFitPadding: number; static shouldDisplayBarDataLabel(context: any, formatter?: (value: any, context: any) => any): boolean; static doesLabelFitInBar(context: any, labelText: any): boolean; static createBarDataLabelsConfig(theme: DashboardTheme, formatter?: (value: any, context: any) => any): any; static defaultTooltipConfig(theme: DashboardTheme): { enabled: boolean; bodyFont: { size: number; family: string; }; displayColors: boolean; }; static defaultLegendConfig(model: SelectBase): { position: "left" | "right" | "top" | "bottom"; align: "start"; labels: { color: string; font: { size: number; family: string; weight: number; }; usePointStyle: boolean; pointStyle: string; pointStyleWidth: number; boxWidth: number; padding: number; }; }; static defaultGridConfig(theme: DashboardTheme): { color: string; drawTicks: boolean; display: boolean; }; static defaultAxisTitleFont(theme: DashboardTheme): { color: string; font: { size: number; family: string; weight: number; }; }; static defaultAxisLabelFont(theme: DashboardTheme): { color: string; font: { size: number; family: string; weight: number; }; padding: number; }; static defaultAxisConfig(theme: DashboardTheme): { title: { color: string; font: { size: number; family: string; weight: number; }; display: boolean; }; min: number; ticks: { color: string; font: { size: number; family: string; weight: number; }; padding: number; }; border: { display: boolean; }; grid: { color: string; drawTicks: boolean; display: boolean; }; }; static createLabelAxisAfterFit(theme: DashboardTheme): (axis: any) => void; static defaultGaugeValueFont(theme: DashboardTheme): { color: string; font: { size: number; family: string; weight: number; }; }; static defaultGaugeTickFont(theme: DashboardTheme): { color: string; font: { size: number; family: string; weight: number; }; }; static defaultNoDataConfig(theme: DashboardTheme): { text: any; color: string; font: { size: number; family: string; }; }; static setups: { [type: string]: (model: VisualizerBase, answersData: IAnswersData) => ChartJsOptions; }; static setup(chartType: string, model: VisualizerBase, answersData: IAnswersData): ChartJsOptions; static getTruncatedLabel: (label: string, labelTruncateLength?: number) => string; static setupPie(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupBar(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupVBar(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupLine(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupStackedBar(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupScatter(model: SelectBase, answersData: IAnswersData): ChartJsOptions; static setupGauge(model: NumberModel, answersData: IAnswersData): ChartJsOptions; static setupBullet(model: NumberModel, answersData: IAnswersData): ChartJsOptions; static setupRadar(model: SelectBase, answersData: IAnswersData): ChartJsOptions; }