Embedded analytics SDK API
    Preparing search index...

    Interface SdkQuestionProps

    interface SdkQuestionProps {
        className?: string;
        componentPlugins?: MetabasePluginsConfig;
        entityTypes?: EmbeddingEntityType[];
        height?: Height<string | number>;
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onNavigateBack?: () => void;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        questionId: null | SdkQuestionId;
        style?: CSSProperties;
        targetCollection?: SdkCollectionId;
        title?: SdkQuestionTitleProps;
        width?: Width<string | number>;
        withChartTypeSelector?: boolean;
        withDownloads?: boolean;
        withResetButton?: boolean;
    }
    Index

    Properties

    className?: string

    A custom class name to be added to the root element.

    componentPlugins?: MetabasePluginsConfig

    Additional mapper function to override or add drill-down menu

    entityTypes?: EmbeddingEntityType[]

    An array that specifies which entity types are available in the data picker

    height?: Height<string | number>

    A number or string specifying a CSS size value that specifies the height of the component

    initialSqlParameters?: SqlParameterValues

    Initial values for the SQL parameters.

    isSaveEnabled?: boolean

    Whether to show the save button.

    onBeforeSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    onNavigateBack?: () => void

    A callback function that triggers when a user clicks the back button.

    onRun?: (question: undefined | MetabaseQuestion) => void

    A callback function that triggers when a question is updated, including when a user clicks the Visualize button in the question editor

    onSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    questionId: null | SdkQuestionId

    A custom style object to be added to the root element.

    targetCollection?: SdkCollectionId

    The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

    Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

    width?: Width<string | number>

    A number or string specifying a CSS size value that specifies the width of the component

    withChartTypeSelector?: boolean

    Determines whether the chart type selector and corresponding settings button are shown. Only relevant when using the default layout.

    withDownloads?: boolean

    Enables the ability to download results in the interactive question.

    withResetButton?: boolean

    Determines whether a reset button is displayed. Only relevant when using the default layout.