Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

25.6 KB
Raw Blame

InteractiveQuestion

BackButton()

BackButton: (props: InteractiveQuestionBackButtonProps) =>
  | Element
  | null;

Function

A navigation button that returns to the previous view. Only visible when rendered within the InteractiveDashboardProps.renderDrillThroughQuestion prop.

Parameters

Parameter Type Description
props InteractiveQuestionBackButtonProps

Returns

| Element | null

Deprecated

Use InteractiveQuestion.NavigationBackButton instead


Breakout()

Breakout: () =>
  | Element
  | null;

Function

A set of badges for managing data groupings (breakouts). Uses question context for breakout functionality.

Returns

| Element | null


BreakoutDropdown()

BreakoutDropdown: (props: InteractiveQuestionBreakoutDropdownProps) =>
  | Element
  | null;

Function

Dropdown button for the Breakout component.

Parameters

Parameter Type Description
props InteractiveQuestionBreakoutDropdownProps

Returns

| Element | null


ChartTypeDropdown()

ChartTypeDropdown: (props: InteractiveQuestionChartTypeDropdownProps) =>
  Element;

Function

Dropdown for selecting the visualization type (bar chart, line chart, table, etc.). Automatically updates to show recommended visualization types for the current data.

Parameters

Parameter Type Description
props InteractiveQuestionChartTypeDropdownProps

Returns

Element


ChartTypeSelector()

ChartTypeSelector: (props: StackProps) => Element;

Function

Detailed chart type selection interface with recommended visualization options.

Parameters

Parameter Type Description
props StackProps

Returns

Element


DownloadWidget()

DownloadWidget: (props: StackProps) =>
  | Element
  | null;

Function

Provides a UI widget for downloading data in different formats (CSV, XLSX, JSON, and PNG depending on the visualization).

Parameters

Parameter Type Description
props StackProps

Returns

| Element | null


DownloadWidgetDropdown()

DownloadWidgetDropdown: (props: PopoverProps) =>
  | Element
  | null;

Function

Provides a button that contains a dropdown that shows the DownloadWidget.

Parameters

Parameter Type Description
props PopoverProps

Returns

| Element | null


Editor()

Editor: (props: InteractiveQuestionEditorProps) =>
  | Element
  | null;

Function

Advanced query editor that provides full access to question configuration. Includes filtering, aggregation, custom expressions, and joins.

Parameters

Parameter Type Description
props InteractiveQuestionEditorProps

Returns

| Element | null


EditorButton()

EditorButton: (props: InteractiveQuestionEditorButtonProps) =>
  | Element
  | null;

Function

Toggle button for showing/hiding the Editor interface. In custom layouts, the EditorButton must have an InteractiveQuestionEditorButtonProps.onClick` handler or the button won't do anything when clicked.

Parameters

Parameter Type Description
props InteractiveQuestionEditorButtonProps

Returns

| Element | null


Filter()

Filter: (props: InteractiveQuestionFilterProps) => Element;

Function

A set of interactive filter badges that allow adding, editing, and removing filters. Displays current filters as badges with an "Add another filter" option.

Parameters

Parameter Type Description
props InteractiveQuestionFilterProps

Returns

Element


FilterDropdown()

FilterDropdown: (props: InteractiveQuestionFilterDropdownProps) =>
  | Element
  | null;

Function

A dropdown button for the Filter component.

Parameters

Parameter Type Description
props InteractiveQuestionFilterDropdownProps

Returns

| Element | null


Notebook()

Notebook: (props: InteractiveQuestionEditorProps) =>
  | Element
  | null;

Function

Advanced query editor that provides full access to question configuration. Includes filtering, aggregation, custom expressions, and joins.

Parameters

Parameter Type Description
props InteractiveQuestionEditorProps

Returns

| Element | null

Deprecated

Use InteractiveQuestion.Editor instead


NotebookButton()

NotebookButton: (props: InteractiveQuestionEditorButtonProps) =>
  | Element
  | null;

Function

Toggle button for showing/hiding the Editor interface. In custom layouts, the EditorButton must have an InteractiveQuestionEditorButtonProps.onClick` handler or the button won't do anything when clicked.

Parameters

Parameter Type Description
props InteractiveQuestionEditorButtonProps

Returns

| Element | null

Deprecated

Use InteractiveQuestion.EditorButton instead


QuestionSettings()

QuestionSettings: (props: StackProps) =>
  | Element
  | null;

Function

Settings panel for configuring visualization options like axes, colors, and formatting. Uses question context for settings.

Parameters

Parameter Type Description
props StackProps

Returns

| Element | null


QuestionSettingsDropdown()

QuestionSettingsDropdown: (
  props?: InteractiveQuestionQuestionSettingsDropdownProps,
) => Element;

Function

Dropdown button that contains the QuestionSettings component.

Parameters

Parameter Type Description
props? InteractiveQuestionQuestionSettingsDropdownProps

Returns

Element


QuestionVisualization()

QuestionVisualization: (
  props: {
    className?: string;
    style?: CSSProperties;
  } & {
    height?: Height<string | number>;
    width?: Width<string | number>;
  } & {},
) => Element;

Function

The main visualization component that renders the question results as a chart, table, or other visualization type.

Parameters

Parameter Type Description
props { className?: string; style?: CSSProperties; } & { height?: Height<string | number>; width?: Width<string | number>; } & { }

Returns

Element


RefreshButton()

RefreshButton: (props?: InteractiveQuestionRefreshButtonProps) =>
  | Element
  | null;

Function

Button to run the current query. Only appears when automatic reruns are turned off for the database.

Parameters

Parameter Type Description
props? InteractiveQuestionRefreshButtonProps

Returns

| Element | null


ResetButton()

ResetButton: (props?: ButtonProps) =>
  | Element
  | null;

Function

Button to reset question modifications. Only appears when there are unsaved changes to the question.

Parameters

Parameter Type Description
props? ButtonProps

Returns

| Element | null


SaveButton()

SaveButton: (props?: InteractiveQuestionSaveButtonProps) => Element;

Function

Button for saving question changes. Only enabled when there are unsaved modifications to the question.

Note: Currently, in custom layouts, the SaveButton must have an onClick handler or the button will not do anything when clicked.

Parameters

Parameter Type Description
props? InteractiveQuestionSaveButtonProps

Returns

Element


SaveQuestionForm()

SaveQuestionForm: (props: InteractiveQuestionSaveQuestionFormProps) =>
  | Element
  | null;

Function

Form for saving a question, including title and description. When saved:

Parameters

Parameter Type Description
props InteractiveQuestionSaveQuestionFormProps

Returns

| Element | null


SqlParametersList()

SqlParametersList: () =>
  | Element
  | null;

Function

Parameters list for SQL questions

Returns

| Element | null


Summarize()

Summarize: () => Element;

Function

Interface for adding and managing data summaries (like counts, sums, averages). Displays as a set of badges. Uses question context for summarization functionality.

Returns

Element


SummarizeDropdown()

SummarizeDropdown: (props: InteractiveQuestionSummarizeDropdownProps) =>
  | Element
  | null;

Function

Dropdown button for the Summarize component.

Parameters

Parameter Type Description
props InteractiveQuestionSummarizeDropdownProps

Returns

| Element | null


Title()

Title: (props: {
  className?: string;
  style?: CSSProperties;
}) =>
  | Element
  | undefined;

Function

Displays a title based on the question's state. Shows:

  • The question's display name if it's saved
  • An auto-generated description for ad-hoc questions (non-native queries)

Parameters

Parameter Type Description
props { className?: string; style?: CSSProperties; }
props.className? string A custom class name to be added to the root element.
props.style? CSSProperties A custom style object to be added to the root element.

Returns

| Element | undefined


VisualizationButton()

VisualizationButton: () =>
  | Element
  | null;

Function

A button that triggers the visualization of the current question.

Returns

| Element | null

other

AlertsButton()

AlertsButton: () => Element;

Returns

Element


NavigationBackButton

NavigationBackButton: FC<{
  className?: string;
  style?: CSSProperties;
}>;

Back button to navigate back after drills and internal navigation. It will render null if there's nothing to go back to