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

    MetabaseTheme 接口

    嵌入式 Metabase 组件的主题配置。

    interface MetabaseTheme {
        colors?: MetabaseColors;
        components?: {
            cartesian?: {
                goalLine?: { label?: { fontSize?: string } };
                label?: { fontSize?: string };
                padding?: string;
            };
            collectionBrowser?: {
                breadcrumbs?: {
                    expandButton?: {
                        backgroundColor?: string;
                        hoverBackgroundColor?: string;
                        hoverTextColor?: string;
                        textColor?: string;
                    };
                };
                emptyContent?: {
                    icon?: {
                        height?: Width<(...) | (...)>;
                        width?: Width<(...) | (...)>;
                    };
                    subtitle?: { fontSize?: FontSize<(...) | (...)> };
                    title?: { fontSize?: FontSize<(...) | (...)> };
                };
            };
            dashboard?: {
                backgroundColor?: string;
                card?: { backgroundColor?: string; border?: string };
                gridBorderColor?: string;
            };
            number?: {
                value?: { fontSize?: FontSize<string | number>; 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;
            };
        };
        fontFamily?: string & {}
        | MetabaseFontFamily;
        fontSize?: string;
        lineHeight?: string | number;
    }
    索引

    属性

    颜色调色板

    components?: {
        cartesian?: {
            goalLine?: { label?: { fontSize?: string } };
            label?: { fontSize?: string };
            padding?: string;
        };
        collectionBrowser?: {
            breadcrumbs?: {
                expandButton?: {
                    backgroundColor?: string;
                    hoverBackgroundColor?: string;
                    hoverTextColor?: string;
                    textColor?: string;
                };
            };
            emptyContent?: {
                icon?: { height?: Width<(...) | (...)>; width?: Width<(...) | (...)> };
                subtitle?: { fontSize?: FontSize<(...) | (...)> };
                title?: { fontSize?: FontSize<(...) | (...)> };
            };
        };
        dashboard?: {
            backgroundColor?: string;
            card?: { backgroundColor?: string; border?: string };
            gridBorderColor?: string;
        };
        number?: {
            value?: { fontSize?: FontSize<string | number>; 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?: string;
                  hoverBackgroundColor?: string;
                  hoverTextColor?: string;
                  textColor?: string;
              };
          };
          emptyContent?: {
              icon?: { height?: Width<(...) | (...)>; width?: Width<(...) | (...)> };
              subtitle?: { fontSize?: FontSize<(...) | (...)> };
              title?: { fontSize?: 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?: FontSize<string | number>; lineHeight?: string } }

      数字图表

      • 可选value?: { fontSize?: FontSize<string | number>; 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

        工具提示文本颜色。

    fontFamily?: string & {} | MetabaseFontFamily

    将用于所有文本的字体系列,默认为实例的默认字体。

    fontSize?: string

    基本字体大小。支持的单位有 px、em 和 rem。默认为约14px(0.875em)

    lineHeight?: string | number

    基准行高

    © . All rights reserved.