Embedded analytics SDK API
    Preparing search index...

    Interface StaticDashboardProps

    interface StaticDashboardProps {
        className?: string;
        dashboardId: SdkDashboardId;
        dataPickerProps?: Pick<SdkQuestionProps, "entityTypes">;
        hiddenParameters?: string[];
        initialParameters?: ParameterValues;
        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;
        plugins?: MetabasePluginsConfig;
        style?: CSSProperties;
        withCardTitle?: boolean;
        withDownloads?: boolean;
        withTitle?: boolean;
    }
    Index

    Properties

    className?: string

    A custom class name to be added to the root element.

    dashboardId: SdkDashboardId

    The ID of the dashboard.
    This is either:

    • the numerical ID when accessing a dashboard link, i.e. http://localhost:3000/dashboard/1-my-dashboard where the ID is 1
    • the string ID found in the entity_id key of the dashboard object when using the API directly or using the SDK Collection Browser to return data
    dataPickerProps?: Pick<SdkQuestionProps, "entityTypes">

    Additional props to pass to the query builder rendered by InteractiveQuestion when creating a new dashboard question.

    hiddenParameters?: string[]

    A list of parameters to hide.

    initialParameters?: ParameterValues

    Query parameters for the dashboard. For a single option, use a string value, and use a list of strings for multiple options.

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

    Callback that is called when the dashboard is loaded.

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

    Callback that is called when the dashboard is loaded without cards.

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

    A callback function that triggers when a question is opened from a dashboard card or when the user changes the visualization type of a question.

    Type Declaration

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

        • visualization:
              | "object"
              | "table"
              | "bar"
              | "line"
              | "pie"
              | "scalar"
              | "row"
              | "area"
              | "combo"
              | "pivot"
              | "smartscalar"
              | "gauge"
              | "progress"
              | "funnel"
              | "map"
              | "scatter"
              | "waterfall"
              | "sankey"
              | "list"

          the new visualization type

        Returns void

    Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.

    A custom style object to be added to the root element.

    withCardTitle?: boolean

    Whether the dashboard cards should display a title.

    withDownloads?: boolean

    Whether to hide the download button.

    withTitle?: boolean

    Whether the dashboard should display a title.