UNPKG

survey-analytics

Version:

SurveyJS Dashboard is a UI component for visualizing and analyzing survey data. It interprets the form JSON schema to identify question types and renders collected responses using interactive charts and tables.

33 lines (32 loc) 1.66 kB
import { Event } from "survey-core"; import { IAnswersData, SelectBase } from "../selectBase"; import { VisualizerBase } from "../visualizerBase"; import { NumberModel } from "../number"; export interface PlotlyOptions { traces: Array<any>; layout: any; hasSeries: boolean; } export declare class PlotlySetup { static imageExportFormat: string; /** * Fires when end user clicks on the 'save as image' button. */ static onImageSaving: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>; /** * Fires before plot will be created. User can change traces, layout and config of the plot. * Options is an object with the following fields: traces, layout and config of the plot. */ static onPlotCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>; static setups: { [type: string]: (model: VisualizerBase, answersData: IAnswersData) => PlotlyOptions; }; static setup(charType: string, model: VisualizerBase, answersData: IAnswersData): PlotlyOptions; static getTruncatedLabel: (label: string, labelTruncateLength: number) => string; static setupPie(model: SelectBase, answersData: IAnswersData): PlotlyOptions; static setupBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions; static setupVBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions; static setupScatter(model: SelectBase, answersData: IAnswersData): PlotlyOptions; static setupGauge(model: NumberModel, answersData: IAnswersData): PlotlyOptions; static setupRadar(model: SelectBase, answersData: IAnswersData): PlotlyOptions; }