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

    类型别名 MetabaseComponentTheme

    用于自定义特定Metabase组件和可视化的主题选项。

    type MetabaseComponentTheme = {
        cartesian: {
            goalLine: { label: { fontSize: string } };
            label: { fontSize: string };
            padding?: string;
        };
        collectionBrowser: {
            breadcrumbs: {
                expandButton: {
                    backgroundColor: {};
                    hoverBackgroundColor: {};
                    hoverTextColor: {};
                    textColor: {};
                };
            };
            emptyContent: {
                icon: {
                    height: CSSProperties["width"];
                    width: CSSProperties["width"];
                };
                subtitle: { fontSize: CSSProperties["fontSize"] };
                title: { fontSize: CSSProperties["fontSize"] };
            };
        };
        dashboard: {
            backgroundColor: string;
            card: { backgroundColor: string; border?: string };
            gridBorderColor?: string;
        };
        number?: {
            value?: { fontSize?: CSSProperties["fontSize"]; lineHeight?: string };
        };
        pivotTable: {
            cell: { fontSize: string };
            rowToggle: { backgroundColor: string; textColor: string };
        };
        popover: { zIndex?: number };
        question: {
            backgroundColor: string;
            toolbar?: { backgroundColor?: string };
        };
        table: {
            cell: { backgroundColor?: string; fontSize: string; textColor: string };
            idColumn?: { backgroundColor?: string; textColor: string };
            stickyBackgroundColor?: string;
        };
        tooltip?: {
            backgroundColor?: string;
            focusedBackgroundColor?: string;
            secondaryTextColor?: string;
            textColor?: string;
        };
    }
    索引

    属性

    cartesian: {
        goalLine: { label: { fontSize: string } };
        label: { fontSize: string };
        padding?: string;
    }

    笛卡尔图表

    类型声明

    • goalLine: { label: { fontSize: string } }
      • label: { fontSize: string }
        • fontSize: string

          目标线标签的字体大小

    • label: { fontSize: string }
      • fontSize: string

        笛卡尔图表中使用的标签,例如轴刻度和系列。

    • 可选padding?: string

      图表周围的填充。

    collectionBrowser: {
        breadcrumbs: {
            expandButton: {
                backgroundColor: {};
                hoverBackgroundColor: {};
                hoverTextColor: {};
                textColor: {};
            };
        };
        emptyContent: {
            icon: { height: CSSProperties["width"]; width: CSSProperties["width"] };
            subtitle: { fontSize: CSSProperties["fontSize"] };
            title: { fontSize: CSSProperties["fontSize"] };
        };
    }
    dashboard: {
        backgroundColor: string;
        card: { backgroundColor: string; border?: string };
        gridBorderColor?: string;
    }

    类型声明

    • backgroundColor: string
    • card: { backgroundColor: string; border?: string }
      • backgroundColor: string
      • 可选border?: string

        设置时为仪表盘卡片添加自定义边框。值与CSS中的border属性相同,例如“1px solid #ff0000”。这将替换卡片的投影。

    • 可选gridBorderColor?: string

      仪表盘网格的边框颜色,仅在编辑仪表盘时显示。默认为 colors.border

    number?: {
        value?: { fontSize?: CSSProperties["fontSize"]; lineHeight?: string };
    }

    数字图表

    类型声明

    • 可选value?: { fontSize?: CSSProperties["fontSize"]; lineHeight?: string }

      数字图表上显示的值。这也适用于趋势图表中的主要值。

    pivotTable: {
        cell: { fontSize: string };
        rowToggle: { backgroundColor: string; textColor: string };
    }

    数据透视表 *

    类型声明

    • cell: { fontSize: string }
      • fontSize: string

        单元格值的字体大小,默认为 ~12px

    • rowToggle: { backgroundColor: string; textColor: string }

      切换数据透视表行的按钮

    popover: { zIndex?: number }

    浮动框

    类型声明

    • 可选zIndex?: number

      覆盖层的z-index。用于在模态框中嵌入组件时很有用。默认为 200。

    question: { backgroundColor: string; toolbar?: { backgroundColor?: string } }

    类型声明

    • backgroundColor: string

      所有问题的背景颜色

    • 可选toolbar?: { backgroundColor?: string }

      默认交互式问题布局的工具栏

    table: {
        cell: { backgroundColor?: string; fontSize: string; textColor: string };
        idColumn?: { backgroundColor?: string; textColor: string };
        stickyBackgroundColor?: string;
    }

    数据表 *

    类型声明

    • cell: { backgroundColor?: string; fontSize: string; textColor: string }
      • 可选backgroundColor?: string

        单元格的默认背景颜色,默认为 background

      • fontSize: string

        单元格值的字体大小,默认为 ~12.5px

      • textColor: string

        单元格的文本颜色,默认为 text-primary

    • 可选idColumn?: { backgroundColor?: string; textColor: string }
      • 可选backgroundColor?: string

        ID 列的背景颜色,默认为 lighten(brand)

      • textColor: string

        ID 列的文本颜色,默认为 brand

    • 可选stickyBackgroundColor?: string

      滚动时保持固定的表头的背景颜色。如果未设置单元格背景颜色,则默认为 white

    tooltip?: {
        backgroundColor?: string;
        focusedBackgroundColor?: string;
        secondaryTextColor?: string;
        textColor?: string;
    }

    工具提示

    类型声明

    • 可选backgroundColor?: string

      工具提示背景颜色。

    • 可选focusedBackgroundColor?: string

      焦点行的工具提示背景颜色。

    • 可选secondaryTextColor?: string

      工具提示中显示的次要文本颜色,例如用于工具提示标题和百分比变化。

    • 可选textColor?: string

      工具提示文本颜色。

    © . All rights reserved.