嵌入式分析 SDK - 插件
⚠️ 此功能为 Beta 版本。欢迎试用,但请注意,功能可能会发生变化(并且可能无法按预期工作)。
Metabase 嵌入 SDK 支持插件来定制组件的行为。这些插件可以在全局上下文或按组件使用。
全局插件
要全局使用插件,请将插件添加到 MetabaseProvider
的 pluginsConfig
属性
<MetabaseProvider
config={config}
theme={theme}
pluginsConfig={{
mapQuestionClickActions: [...] // Add your custom actions here
}}
>
{children}
</MetabaseProvider>
组件插件
要在每个组件的基础上使用插件,请将插件作为属性传递给组件
<InteractiveQuestion
questionId={1}
plugins={{
mapQuestionClickActions: [...],
}}
/>
进一步阅读
阅读其他版本的 Metabase文档。