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

    函数 InteractiveQuestion

    • 一个支持向下钻取的问题组件。

      参数

      • props: InteractiveQuestionProps
        • 可选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
        • questionId: null | SdkQuestionId
        • 可选style?: CSSProperties

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

        • 可选targetCollection?: SdkCollectionId

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

        • 可选title?: SdkQuestionTitleProps

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

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

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

        • 可选withChartTypeSelector?: boolean

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

        • 可选withDownloads?: boolean

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

        • 可选withResetButton?: boolean

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

      返回 Element

    索引

    InteractiveQuestion

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

    类型声明

    Breakout: () => null | Element

    类型声明

      • (): null | Element
      • 函数

        一组用于管理数据分组(拆分)的徽章。使用问题上下文进行拆分功能。

        返回 null | Element

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

    类型声明

    ChartTypeDropdown: (props: MenuProps) => Element

    类型声明

      • (props: MenuProps): Element
      • 函数

        用于选择可视化类型(条形图、折线图、表格等)的下拉菜单。自动更新以显示当前数据的推荐可视化类型。

        参数

        返回 Element

    ChartTypeSelector: (props: StackProps) => Element

    类型声明

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

    类型声明

      • (props: StackProps): null | Element
      • 函数

        提供一个用于以不同格式(CSVXLSXJSONPNG,取决于可视化)下载数据的 UI 组件。

        参数

        返回 null | Element

    DownloadWidgetDropdown: (props: PopoverProps) => Element

    类型声明

    Editor: (props: InteractiveQuestionEditorProps) => undefined | Element

    类型声明

    EditorButton: (
        props: InteractiveQuestionEditorButtonProps,
    ) => undefined | false | Element

    类型声明

    类型声明

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

    类型声明

    Notebook: (props: InteractiveQuestionEditorProps) => undefined | Element

    类型声明

    请改用 InteractiveQuestion.Editor

    NotebookButton: (
        props: InteractiveQuestionEditorButtonProps,
    ) => undefined | false | Element

    类型声明

    请改用 InteractiveQuestion.EditorButton

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

    类型声明

      • (props: StackProps): null | Element
      • 函数

        用于配置轴、颜色和格式等可视化选项的设置面板。使用问题上下文进行设置。

        参数

        返回 null | Element

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

    类型声明

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

    类型声明

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

        主要的可视化组件,将问题结果渲染为图表、表格或其他可视化类型。

        参数

        • props: { className?: string; style?: CSSProperties } & {
              height?: Height<string | number>;
              width?: Width<string | number>;
          } & {}
          • 可选className?: string

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

          • 可选style?: CSSProperties

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

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

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

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

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

          返回 Element

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

      类型声明

      类型声明

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

      类型声明

      Summarize: () => Element

      类型声明

        • (): Element
        • 函数

          用于添加和管理数据摘要(如计数、求和、平均值)的界面。显示为一组徽章。使用问题上下文进行摘要功能。

          返回 Element

      SummarizeDropdown: (props: InteractiveQuestionSummarizeDropdownProps) => Element

      类型声明

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

      类型声明

        • (props: { className?: string; style?: CSSProperties }): undefined | Element
        • 函数

          根据问题状态显示标题。显示

          • 如果已保存,则显示问题的显示名称
          • 临时问题(非原生查询)的自动生成描述

          参数

          • props: { className?: string; style?: CSSProperties }
            • 可选className?: string

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

            • 可选style?: CSSProperties

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

          返回 undefined | Element

      其他

      VisualizationButton: () => null | Element
      © . This site is unofficial and not affiliated with Metabase, Inc.