# Embed visualizations in app plugin

**URL:** <https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771>\
**Category:** Kibana\
**Created:** [October 12, 2017, 4:54pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771 "2017-10-12T16:54:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![havidarou](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@havidarou](https://discuss.elastic.co/u/havidarou)\
**Post date:** [October 12, 2017, 4:54pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/1 "2017-10-12T16:54:19Z")

</div>

Hi everyone!  
I saw this PR in Kibana: [add API to embed visualizations by ppisljar · Pull Request #14292 · elastic/kibana · GitHub](https://github.com/elastic/kibana/pull/14292)

In the sample code, the test\_vis\_app.js controller fills the data for the visualization.

And I wonder, what is the structure of myVisData variable? Is it the same for every type of visualization? Is there documentation about this?

Also, in the final line:

> $scope.myVis = new Vis('.logstash\*', visConfig);

What is the '.logstash\*', an index-pattern?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [October 13, 2017, 8:24pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/2 "2017-10-13T20:24:44Z")

</div>

ping @thomasneirynck

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [October 26, 2017, 12:27pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/3 "2017-10-26T12:27:10Z")

</div>

Hi @havidarou,

That PR is probably not the best to find out about these things, as the attached sample code went stale as the PR progressed.

If you're interested in plugin development, I would start with:

- [https://www.elastic.co/guide/en/kibana/master/development.html](https://www.elastic.co/guide/en/kibana/master/development.html)

And particularly, for visualization plugins

- [https://www.elastic.co/guide/en/kibana/master/development-visualize-index.html](https://www.elastic.co/guide/en/kibana/master/development-visualize-index.html)

This is all targeted to the upcoming v6 release.

Thanks,

---

<div class="post-metadata">

**Author:** ![havidarou](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@havidarou](https://discuss.elastic.co/u/havidarou)\
**Post date:** [October 26, 2017, 8:19pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/4 "2017-10-26T20:19:03Z")

</div>

Thanks @thomasneirynck.

I've been looking at the links and I have doubts.

The example code shown in [https://www.elastic.co/guide/en/kibana/master/development-embedding-visualizations.htm](https://www.elastic.co/guide/en/kibana/master/development-embedding-visualizations.htm) (in the visualize example) creates a new controller for the Kibana module.

Is it the way to proceed? If I have a plugin called, let's say, test, I'd still have to add the controller to the Kibana module for it to work?

Or should I add the controller to my plugin's module? In that case, what imports should I do and where? Do I have to modify the uiExports in my plugin? adding the 'uses' part? add dependencies to the angular module definition?

Is there a sample plugin showing how to do this somewhere?

Thanks in advance!

Regards.

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [October 26, 2017, 8:45pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/5 "2017-10-26T20:45:28Z")

</div>

hi @havidarou,

no you have some flexibility in how you develop and embed plugins. You don't have to use the angular controllers necessarily. I think we're running a little behind on the docs there, as Kibana has some new modules that will make embedding easier.

You do always need your plugins module though, that will bootstrap your plugin inside Kibana.

Are you able to attend this webinar?

[https://www.elastic.co/webinars/creating-custom-kibana-visualizations?ultron=creating-custom-kibana-visualizations-webinar&blade=invite&hulk=email](https://www.elastic.co/webinars/creating-custom-kibana-visualizations?ultron=creating-custom-kibana-visualizations-webinar&blade=invite&hulk=email)

I think that will give you a high level overview and probably a decent starting point.

---

<div class="post-metadata">

**Author:** ![havidarou](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@havidarou](https://discuss.elastic.co/u/havidarou)\
**Post date:** [October 30, 2017, 10:57am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/6 "2017-10-30T10:57:04Z")

</div>

Hi @thomasneirynck I'll attend the webinar.

In the meantime, what are these Kibana modules you mention?

Regards.

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [October 30, 2017, 1:36pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/7 "2017-10-30T13:36:06Z")

</div>

hi @havidarou, please check [https://www.elastic.co/guide/en/kibana/master/development-embedding-visualizations.html](https://www.elastic.co/guide/en/kibana/master/development-embedding-visualizations.html), it has some documentation on the `ui/visualize/loader` module.

thanks,

---

<div class="post-metadata">

**Author:** ![havidarou](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@havidarou](https://discuss.elastic.co/u/havidarou)\
**Post date:** [October 31, 2017, 11:25am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/8 "2017-10-31T11:25:10Z")

</div>

Thanks @thomasneirynck

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [November 1, 2017, 8:08am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/9 "2017-11-01T08:08:40Z")

</div>

how about kibana5.4.3, how to embed a visualize in app plugin?

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [November 6, 2017, 2:30am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/10 "2017-11-06T02:30:46Z")

</div>

@thomasneirynck

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [November 7, 2017, 10:23pm UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/11 "2017-11-07T22:23:13Z")

</div>

hi @whoami,

that documentation only applies to v6.0 and up, so embedding a visualization in 5.4.3 will not be possible.

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [November 13, 2017, 9:50am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/12 "2017-11-13T09:50:36Z")

</div>

what a pity

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 11, 2017, 9:50am UTC](https://discuss.elastic.co/t/embed-visualizations-in-app-plugin/103771/13 "2017-12-11T09:50:43Z")

</div>

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