# How do I add a custom Vega transformation?

**URL:** <https://discuss.elastic.co/t/how-do-i-add-a-custom-vega-transformation/246546>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [August 27, 2020, 4:19am UTC](https://discuss.elastic.co/t/how-do-i-add-a-custom-vega-transformation/246546 "2020-08-27T04:19:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moxenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moxenb/32/74585_2.png) [@moxenb](https://discuss.elastic.co/u/moxenb)\
**Post date:** [August 27, 2020, 4:19am UTC](https://discuss.elastic.co/t/how-do-i-add-a-custom-vega-transformation/246546/1 "2020-08-27T04:19:17Z")

</div>

I would like to create a custom Vega transformation, specifically to put time ranges into arbitrary buckets such that they never overlap in a given bucket (basically to show the duration and disposition of a set of tasks that have been processed). I've looked over the existing transform code, and read through the Vega extension API docs, and this sounds doable.

What I can't figure out, though, is how to actually call the [Vega extensibility API](https://vega.github.io/vega/docs/api/extensibility/). Are there any examples of similar extensions or plug-ins that do similar work? Or can you point me to how I could gain access via some other channel? I've been unable to find anything related on GitHub.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 31, 2020, 11:13am UTC](https://discuss.elastic.co/t/how-do-i-add-a-custom-vega-transformation/246546/2 "2020-08-31T11:13:09Z")

</div>

@moxenb  
unfortunately you can't use the vega extensibility API right away from the Kibana Vega editor.  
What you can do is you can build a Kibana visualization plugin [https://www.elastic.co/guide/en/kibana/current/development-getting-started.html](https://www.elastic.co/guide/en/kibana/current/development-getting-started.html) to build your own set of functions/vega extensions.  
On the other end, if you can be more precise on your use case and provide me an example I can check what can be done directly in vega if possible

---

<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:** [September 28, 2020, 11:13am UTC](https://discuss.elastic.co/t/how-do-i-add-a-custom-vega-transformation/246546/3 "2020-09-28T11:13:25Z")

</div>

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