IDashboardOptions
A configuration object passed to the Dashboard constructor.
Get Started with SurveyJS Dashboard
Inherited from the following class(es):
Properties
Methods
Events
Obsolete. Use the allowSortAnswers property instead.
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Enables switching between different visualizer types.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
Enables drag-and-drop reordering of dashboard items. Applies only if allowDynamicLayout is true.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
- See also:
- layoutEngine
Enables automatic layout based on available screen space and allows users to reorder items via drag and drop.
If disabled, items are rendered sequentially (one below another), and drag-and-drop reordering is disabled. To disable only drag-and-drop while keeping dynamic layout, set allowDragDrop to false.
Default value: true
How to Disable the Layout Engine
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
- See also:
- layoutEngine
Enables hiding answers with zero responses in bar charts, histograms, and statistics tables. Adds a Hide Empty Answers button to each supported visualizer.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Enables users to hide individual dashboard items. Adds a Hide button to each item.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
Enables cross-filtering between dashboard items. When enabled, selecting a data point filters other dashboard items accordingly.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
Enables displaying the number of respondents who skipped a question. Adds a Show Missing Answers button to each chart.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Allows users to toggle between absolute values and percentages in bar charts. Adds a Show Percentages button to each bar chart.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
- See also:
- showPercentages * , showOnlyPercentages * , percentagePrecision
Enables sorting answers by response count in bar charts, histograms, and statistics tables. Adds a Sorting dropdown to each supported dashboard item.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
- See also:
- answersOrder
Enables selection of top 5, 10, or 20 answers by response count. Adds a Top N Answers dropdown to each chart.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Enables transposing data for matrix question visualizations.
Adds a Transpose button to supported charts.
- Per Values – Matrix rows become chart arguments, columns become series.
- Per Columns – Matrix rows become series, columns become arguments.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Specifies the answer sorting order in bar charts, histograms, and statistics tables.
Accepted values:
"default"(default) – Preserve original order."asc"– Sort by ascending response count."desc"– Sort by descending response count.
Users can modify this setting in the UI if allowSortAnswers is enabled.
- Type:
- "default" | "asc" | "desc" readonly
- Implemented in:
- ISelectBaseVisualizerOptions
An array of date periods available for selection in the date panel.
Refer to datePeriod for supported values.
- Type:
- DatePeriodEnum[] readonly
- Implemented in:
- IDashboardOptions
An array of survey response objects to visualize.
In addition to data, specify at least one of the following:
questions
Dashboard items are generated automatically based on question settings.items
Dashboard items are defined explicitly.- Both
questionsanditems
Items are generated fromquestionsand then customized usingitems.
- Type:
- any[] readonly
- Implemented in:
- IDashboardOptions
The name of a data field that contains date values used by the date panel.
- Type:
- string readonly
- Implemented in:
- IDashboardOptions
The predefined date period selected in the date panel. Applies only if dateFieldName is specified.
Supported values:
"last7days""last14days""last28days""last30days""lastWeekSun""lastWeekMon""lastMonth""lastQuarter""lastYear""ytd""mtd""wtdSun""wtdMon""qtd"
- Type:
- "last7days" | "last14days" | "last28days" | "last30days" | "lastWeekMon" | "lastWeekSun" | "lastMonth" | "lastQuarter" | "lastYear" | "ytd" | "mtd" | "wtdSun" | "wtdMon" | "qtd" readonly
- Implemented in:
- IDashboardOptions
- See also:
- availableDatePeriods * , showDatePanel
A [startDate, endDate] tuple that defines a custom date range. Applies only if dateFieldName is specified.
If both datePeriod and dateRange are specified, dateRange takes precedence.
- Type:
- DateRangeTuple readonly
- Implemented in:
- IDashboardOptions
Hides answers with zero responses in bar charts, histograms, and statistics tables.
Default value: false
Users can modify this setting in the UI if allowHideEmptyAnswers is enabled.
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
An array of data field names and dashboard item configuration objects.
Specify this property to define dashboard items explicitly or customize items generated from the questions array. The array order determines the item order in the Dashboard.
- Type:
- (string | IDashboardItemOptions)[] readonly
- Implemented in:
- IDashboardOptions
Maximum label length before truncation starts. Set to -1 to disable truncation.
Default value: 27
- Type:
- number readonly
- Implemented in:
- IVisualizationPanelOptions
A layout engine implementation used to arrange dashboard items. Use this property to integrate a third-party layout engine.
- Type:
- LayoutEngine readonly
- Implemented in:
- IVisualizationPanelOptions
- See also:
- allowDynamicLayout
Default chart legend position.
You can override this setting per dashboard item using the items array.
- Type:
- "left" | "right" | "top" | "bottom" readonly
- Implemented in:
- ISelectBaseVisualizerOptions
Number of decimal places used when displaying percentages.
Default value: 2
- Type:
- number readonly
- Implemented in:
- ISelectBaseVisualizerOptions
- See also:
- allowShowPercentages * , showPercentages * , showOnlyPercentages
An array of survey questions to visualize.
To populate this array, instantiate a SurveyModel, call its getAllQuestions() method, optionally filter the result, and assign it to this property.
When questions are specified, the Dashboard generates items automatically according to question configuration. Use the items array to customize the generated items.
- Type:
- Question[] readonly
- Implemented in:
- IDashboardOptions
Specifies whether to display the total number of answers in the date panel. Applies only if dateFieldName is specified.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IDashboardOptions
Displays only percentages (without absolute values) in bar charts. Applies only if allowShowPercentages or showPercentages is enabled.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
- See also:
- allowShowPercentages * , showPercentages * , percentagePrecision
Displays percentages alongside absolute values in bar charts.
Default value: false
Users can modify this setting in the UI if allowShowPercentages is enabled.
- Type:
- boolean readonly
- Implemented in:
- ISelectBaseVisualizerOptions
- See also:
- showOnlyPercentages * , percentagePrecision
Specifies whether to display the toolbar.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
Removes HTML markup from survey element titles before rendering.
Since survey titles may contain user-defined HTML, keeping this property enabled helps prevent potential injection of malicious code.
Default value: true
- Type:
- boolean readonly
- Implemented in:
- IVisualizationPanelOptions
A survey instance used to apply survey localization settings to the Dashboard UI.
- Type:
- SurveyModel readonly
- Implemented in:
- IVisualizationPanelOptions
Send feedback to the SurveyJS team
Need help? Visit our support page