Error While Embedding Inbuilt Kibana Plugin

Hii,

I want to embedd in build kibana visualization to my custom kibana plugin . I created some visualizations using the kibana UI and later in the code of my custom plugin i followed this tutorial

https://www.elastic.co/blog/developing-new-kibana-visualizations

There is no error in the console i got the list of visualizations in the system . But when i tried to embedd one by providing the ID it is not working properly.

As a test case i developed my own kibana visualization and tried to embedd to my custom plugin . and surprisingly that worked . But when i try to embedd in built kibana visualizations it is not working properly.

I used embedVisualizationWithId() and embedVisualizationWithSavedObject() functions but both failed without any error in the console.

when i inspected the dom element i got
<div class="vislib-chart"></div>
inside that there is noting rendered.

Can anyone please help me on this ?

hey, the blog is currently out of date. Best to check
test/plugin_functional/plugins/kbn_tp_visualize_embedding for an example of how to embed a visualization in your own plugin

When i tried to run the test plugin i get the errors like
Can't resolve 'uiExports/fieldFormats'
Can't resolve 'uiExports/savedObjectTypes'
Can't resolve 'uiExports/search'
Can't resolve 'uiExports/visEditorTypes'
Can't resolve 'uiExports/visRequestHandlers'
Can't resolve 'uiExports/visResponseHandlers'
Can't resolve 'uiExports/visTypes'
Can't resolve 'uiExports/visualize'

Hi Jagadeesh_ctm,

I too am trying to create a custom kibana plugin and embed a custom visualization into it, but I have had no luck doing so yet. i wonder is it possible for you to share the solution you got working with custom visualisation with me? It would be of great help.

@Jagadeesh_ctm those errors look very unexpected, something must have gone wrong with the bundling process.

I just tried running the test plugin and it did work for me:
yarn start --plugin-path=test/plugin_functional/plugins/kbn_tp_visualize_embedding
new plugin called 'embedding vis' shows up in side menu

the plugin won't do anything, as its missing the required data (its made to be run in our automated tests), but it should serve as an example of how to do something like this in your own plugin.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.