InteractiveQuestion component renders an interactive question that allows users to explore data, modify visualizations, apply filters, and drill into details.
Basic usage
With custom height
Using entity ID
You can reference questions by their entity ID instead of numeric ID:Composing with sub-components
TheInteractiveQuestion component provides sub-components for building custom layouts:
Creating new questions
New query builder question
New SQL question
With event handlers
With SQL parameters
Hiding specific parameters
With plugins
Available sub-components
All sub-components can be used within anInteractiveQuestion parent:
Props
The ID of the question. Can be:
- Numerical ID (e.g.,
1) - Entity ID string (e.g.,
"abc123") "new"for a new query builder question"new-native"for a new SQL question
Height of the component (e.g.,
400 or "100%").Width of the component.
Custom CSS styles.
Custom CSS class name.
Whether to show the chart type selector.
Whether to enable download functionality.
Whether to enable alerts functionality.
Whether to enable saving. Required for
questionId="new" or questionId="new-native".Initial values for SQL template tags.
List of parameter names to hide from the UI.
Custom title to display instead of the question’s title.
Plugin configuration for this specific question.
Callback when the question is run.
Callback when the question is saved.
Callback before the question is saved.
Callback when the back button is clicked.
Callback when the visualization type changes.
Collection ID where new questions should be saved.
Dashboard ID to add the question to after saving.
Sub-components reference
InteractiveQuestion.NavigationBackButton
Back button to navigate back after drills and internal navigation. Rendersnull if there’s nothing to go back to.
InteractiveQuestion.Filter
Filter controls for the question.InteractiveQuestion.FilterDropdown
Dropdown menu for filter controls.InteractiveQuestion.ResetButton
Button to reset filters and modifications.InteractiveQuestion.Title
Question title display.InteractiveQuestion.Summarize
Summarization controls.InteractiveQuestion.SummarizeDropdown
Dropdown menu for summarization.InteractiveQuestion.Editor
Query editor (notebook mode).InteractiveQuestion.EditorButton
Button to toggle the query editor.InteractiveQuestion.QuestionVisualization
The main visualization display.InteractiveQuestion.VisualizationButton
Button to toggle visualization settings.InteractiveQuestion.SaveQuestionForm
Form for saving the question.InteractiveQuestion.SaveButton
Button to save the question.InteractiveQuestion.ChartTypeSelector
Selector for changing the chart type.InteractiveQuestion.ChartTypeDropdown
Dropdown menu for chart types.InteractiveQuestion.QuestionSettings
Question settings controls.InteractiveQuestion.QuestionSettingsDropdown
Dropdown menu for question settings.InteractiveQuestion.Breakout
Breakout/group by controls.InteractiveQuestion.BreakoutDropdown
Dropdown menu for breakout options.InteractiveQuestion.DownloadWidget
Download controls.InteractiveQuestion.DownloadWidgetDropdown
Dropdown menu for download options.InteractiveQuestion.AlertsButton
Button to manage question alerts.InteractiveQuestion.SqlParametersList
List of SQL template tag parameters.TypeScript types
Related
- StaticQuestion - Read-only question component
- Event handlers - Working with question events
- Custom styling - Styling questions