嵌入式分析 SDK API
    正在准备搜索索引...

    函数 CreateQuestion

    • 参数

      • 可选props: CreateQuestionProps
        • 可选className?: string

          要添加到根元素的自定义类名。

        • 可选componentPlugins?: MetabasePluginsConfig

          用于覆盖或添加钻取菜单的附加映射函数

        • 可选entityTypes?: EmbeddingEntityType[]

          一个数组,指定数据选择器中可用的实体类型

        • 可选height?: Height<string | number>

          一个数字或字符串,指定CSS大小值,用于指定组件的高度

        • 可选initialSqlParameters?: SqlParameterValues

          SQL参数的初始值。

        • 可选isSaveEnabled?: boolean

          是否显示保存按钮。

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

          保存前触发的回调函数。仅在 `isSaveEnabled = true` 时相关。

        • 可选onNavigateBack?: () => void

          用户点击返回按钮时触发的回调函数。

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

          当问题更新时触发的回调函数,包括用户点击问题编辑器中的 `Visualize` 按钮时。

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

          当用户保存问题时触发的回调函数。仅在 `isSaveEnabled = true` 时相关。

        • 可选plugins?: MetabasePluginsConfig
        • 可选style?: CSSProperties

          要添加到根元素的自定义样式对象。

        • 可选targetCollection?: SdkCollectionId

          保存问题的集合。这将隐藏保存模态框中的集合选择器。仅适用于交互式问题。

        • 可选title?: SdkQuestionTitleProps

          确定是否显示问题标题,并允许显示自定义标题而不是默认问题标题。默认显示。仅适用于使用默认布局的交互式问题。

        • 可选width?: Width<string | number>

          一个数字或字符串,指定CSS大小值,用于指定组件的宽度

        • 可选withChartTypeSelector?: boolean

          确定是否显示图表类型选择器和相应的设置按钮。仅在使用默认布局时相关。

        • 可选withDownloads?: boolean

          启用在交互式问题中下载结果的功能。

        • 可选withResetButton?: boolean

          确定是否显示重置按钮。仅在使用默认布局时相关。

      返回 Element

      请改用 <InteractiveQuestion questionId="new" />

    © . This site is unofficial and not affiliated with Metabase, Inc.