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

    函数 InteractiveDashboard

    • 一个仪表板组件,具有下钻、点击行为,以及查看和点击问题的能力。

      参数

      • props: {
            drillThroughQuestionHeight?: Height<string | number>;
            drillThroughQuestionProps?: DrillThroughQuestionProps;
            plugins?: MetabasePluginsConfig;
            renderDrillThroughQuestion?: () => ReactNode;
        } & {
            dashboardId: SdkDashboardId;
            hiddenParameters?: string[];
            initialParameters?: ParameterValues;
            withCardTitle?: boolean;
            withDownloads?: boolean;
            withTitle?: boolean;
        } & { className?: string; style?: CSSProperties } & {
            onLoad?: (dashboard: null | MetabaseDashboard) => void;
            onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void;
            onVisualizationChange?: (
                visualization:
                    | "object"
                    | "table"
                    | "bar"
                    | "line"
                    | "pie"
                    | "scalar"
                    | "row"
                    | "area"
                    | "combo"
                    | "pivot"
                    | "smartscalar"
                    | "gauge"
                    | "progress"
                    | "funnel"
                    | "map"
                    | "scatter"
                    | "waterfall"
                    | "sankey"
                    | "list",
            ) => void;
        } & { dataPickerProps?: Pick<SdkQuestionProps, "entityTypes"> } & {}
        • OptionaldrillThroughQuestionHeight?: Height<string | number>

          从仪表板钻取到问题级别时,问题组件的高度。

        • OptionaldrillThroughQuestionProps?: DrillThroughQuestionProps

          从仪表板钻取到问题级别时,问题组件的属性。

        • 可选plugins?: MetabasePluginsConfig

          用于覆盖或添加钻取菜单的附加映射函数。详情请参见实现自定义操作部分。

        • OptionalrenderDrillThroughQuestion?: () => ReactNode

          用于渲染问题布局的自定义 React 组件。使用命名空间 InteractiveQuestion 组件来构建布局。

        • dashboardId: SdkDashboardId

          仪表板的 ID。
          这可以是

          • 访问仪表板链接时使用的数字 ID,例如 `https://:3000/dashboard/1-my-dashboard`,其中 ID 为 `1`
          • 在使用 API 或 SDK 集合浏览器直接返回数据时,在仪表板对象的 `entity_id` 键中找到的字符串 ID
        • 可选hiddenParameters?: string[]

          要隐藏的参数列表。

        • 可选initialParameters?: ParameterValues

          仪表板的查询参数。对于单个选项,使用 `string` 值;对于多个选项,使用字符串列表。

        • 可选withCardTitle?: boolean

          仪表板卡片是否显示标题。

        • 可选withDownloads?: boolean

          是否隐藏下载按钮。

        • 可选withTitle?: boolean

          仪表板是否显示标题。

        • 可选className?: string

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

        • 可选style?: CSSProperties

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

        • 可选onLoad?: (dashboard: null | MetabaseDashboard) => void

          仪表板加载时调用的回调函数。

        • 可选onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void

          仪表板在没有卡片的情况下加载时调用的回调函数。

        • 可选onVisualizationChange?: (
              visualization:
                  | "object"
                  | "table"
                  | "bar"
                  | "line"
                  | "pie"
                  | "scalar"
                  | "row"
                  | "area"
                  | "combo"
                  | "pivot"
                  | "smartscalar"
                  | "gauge"
                  | "progress"
                  | "funnel"
                  | "map"
                  | "scatter"
                  | "waterfall"
                  | "sankey"
                  | "list",
          ) => void

          当从仪表板卡片打开问题或用户更改问题的可视化类型时触发的回调函数。

        • 可选dataPickerProps?: Pick<SdkQuestionProps, "entityTypes">

          创建新的仪表板问题时,要传递给 `InteractiveQuestion` 渲染的查询构建器的其他属性。

        返回 Element

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