The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Expand
Properties
| Property | Type | Description |
|---|---|---|
autoRefreshInterval? |
number |
The interval between auto refreshes on the dashboard, in seconds. |
className? |
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 |
drillThroughQuestionHeight? |
Height<string | number> |
Height of a question component when drilled from the dashboard to a question level. |
drillThroughQuestionProps? |
DrillThroughQuestionProps |
Props of a question component when drilled from the dashboard to a question level. |
enableEntityNavigation? |
boolean |
When true, internal click behaviors (links to dashboards/questions) are preserved. When false (default for SDK), these click behaviors are filtered out. |
hiddenParameters? |
string[] |
A list of parameters to hide. - 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. |
initialParameters? |
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. |
navigatedEntityParameters? |
NavigatedEntityParameters |
Parameter values for entities the user reaches through entity navigation, keyed by the navigationId that onNavigatedEntityParametersChange reports. Each navigation gets a new navigationId, and going back keeps it. So an entry applies only to the visit it was written for, never to a later visit of the same entity. Inside each entry, keys are filter slugs for a dashboard and template tag names for a SQL question. Each entry works like parameters on the root and replaces the values of that visit: keys you omit use their default. Use null to clear a value. To keep the values the click set, start from the clickParameters of onNavigatedEntityParametersChange. Questions built with the query builder have no named parameters, so they cannot be controlled. A visit without an entry keeps the click-behavior values and is not controlled. Requires enableEntityNavigation. |
onLoad? |
(dashboard: MetabaseDashboard | null) => void |
Callback that is called when the dashboard is loaded. |
onLoadWithoutCards? |
(dashboard: MetabaseDashboard | null) => void |
Callback that is called when the dashboard is loaded without cards. |
onNavigatedEntityParametersChange? |
(payload: NavigatedEntityParameterChangePayload) => void |
Fires on parameters change on entities the user reaches through entity navigation. The root dashboard keeps reporting through onParametersChange. The payload's navigationId identifies the visit, entityType and entityId the entity. source has the same meaning as in onParametersChange: 'initial-state' fires after each navigation to the entity, also when the user comes back to it. It reports parameter values, it is not a navigation event. clickParameters holds the values the click behavior set. To compose your own values, do it on the first 'initial-state' of a navigationId only, so going back keeps the user's edits. Dashboards without filters send parameters: {}. SQL questions without template tags and questions built with the query builder send no event. |
onParametersChange? |
(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'). |
onVisualizationChange? |
(visualization: | "object" | "table" | "bar" | "line" | "pie" | "scalar" | "row" | "area" | "combo" | "pivot" | "smartscalar" | "gauge" | "progress" | "funnel" | "map" | "scatter" | "boxplot" | "waterfall" | "sankey" | "treemap" | "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. |
parameters? |
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. |
plugins? |
MetabasePluginsConfig |
Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details. |
renderDrillThroughQuestion? |
() => ReactNode |
A custom React component to render the question layout. Use namespaced InteractiveQuestion components to build the layout. |
style? |
CSSProperties |
A custom style object to be added to the root element. |
token? |
string | null |
- |
withCardTitle? |
boolean |
Whether the dashboard cards should display a title. |
withDownloads? |
boolean |
Whether to hide the download button. |
withSubscriptions? |
boolean |
Whether to show the subscriptions button. |
withTitle? |
boolean |
Whether the dashboard should display a title. |