Embedded analytics SDK API
    Preparing search index...

    Function EditableDashboard

    • A dashboard component with the features available in the InteractiveDashboard component, as well as the ability to add and update questions, layout, and content within your dashboard.

      Parameters

      • props: EditableDashboardProps
        • OptionalautoRefreshInterval?: number

          The interval between auto refreshes on the dashboard, in seconds.

        • OptionalclassName?: string

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

        • dashboardId: string | number

          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
        • OptionaldataPickerProps?: Pick<SdkQuestionProps, "entityTypes">

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

        • OptionaldrillThroughQuestionHeight?: Height<string | number>

          Height of a question component when drilled from the dashboard to a question level.

        • OptionaldrillThroughQuestionProps?: DrillThroughQuestionProps

          Props of a question component when drilled from the dashboard to a question level.

        • OptionalenableEntityNavigation?: boolean

          When true, internal click behaviors (links to dashboards/questions) are preserved. When false (default for SDK), these click behaviors are filtered out.

        • OptionalhiddenParameters?: string[]

          A list of parameters to hide.

        • OptionalinitialParameters?: ParameterValues

          Initial values for query parameters, slug-keyed. Applied once on mount; user widget edits afterwards are not reflected back to the host.
          For each parameter:

          • set to a value (string for a single option, array of strings for multiple): that value is applied.
          • set to null: strictly cleared, ignoring the parameter's default.
          • omitted (or set to undefined): falls back to the parameter's default (or null if it has no default).

          • Combining initialParameters and hiddenParameters to filter data on the frontend is a security risk.
          • Combining initialParameters and hiddenParameters to declutter the user interface is fine.
        • OptionalonLoad?: (dashboard: MetabaseDashboard | null) => void

          Callback that is called when the dashboard is loaded.

        • OptionalonLoadWithoutCards?: (dashboard: MetabaseDashboard | null) => void

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

        • OptionalonParametersChange?: (payload: ParameterChangePayload) => void

          Fires on parameters change. The payload's source distinguishes the initial state on load ('initial-state'), user edits in the UI ('manual-change'), and auto-updates ('auto-change').

        • OptionalonVisualizationChange?: (
              visualization:
                  | "object"
                  | "table"
                  | "bar"
                  | "line"
                  | "pie"
                  | "scalar"
                  | "row"
                  | "area"
                  | "combo"
                  | "pivot"
                  | "smartscalar"
                  | "gauge"
                  | "progress"
                  | "funnel"
                  | "map"
                  | "scatter"
                  | "boxplot"
                  | "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.

        • Optionalparameters?: ParameterValues

          Controlled parameter values, slug-keyed. On every render, this object replaces the dashboard's parameter values:

          • a parameter set to a value uses that value.
          • a parameter set to null is cleared, even if it has a default.
          • a parameter omitted from the object (or set to undefined) uses its default (or null if it has no default).

            Pair with onParametersChange to stay in sync with user edits.
          • Combining parameters and hiddenParameters to filter data on the frontend is a security risk.
          • Combining parameters and hiddenParameters to declutter the user interface is fine.
        • Optionalplugins?: MetabasePluginsConfig

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

        • OptionalrenderDrillThroughQuestion?: () => ReactNode

          A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout.

        • Optionalstyle?: CSSProperties

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

        • Optionaltoken?: string | null
        • OptionalwithCardTitle?: boolean

          Whether the dashboard cards should display a title.

        • OptionalwithDownloads?: boolean

          Whether to hide the download button.

        • OptionalwithSubscriptions?: boolean

          Whether to show the subscriptions button.

        • OptionalwithTitle?: boolean

          Whether the dashboard should display a title.

      Returns Element