Is it possible to integrate JavaScript and Kibana?

I am in a quandary here.
I would like to have JavaScript abilities (like buttons)
AND
Kibana for global filters and the selected timerange.

I could write my GUI using JS to talk directly to ES, but then I lose Kibana filters.

I could write my GUI using Kibana + Vega, but then I can't have buttons AFAICT -- see this post: https://github.com/elastic/kibana/issues/30626.

Or to put my question in more concrete terms, try this Vega example in Kibana and notice the lack of buttons: https://vega.github.io/editor/#/examples/vega/nested-bar-chart

Have you considered developing a custom visualization plugin for Kibana? It sounds like you want access to the Kibana context, but more control than Vega. That is what the plugin system is for.

Thank you for responding @wylie.
My JS skills are limited and writing a custom Kibana plugin sounds a bit daunting.
I did watch the youtube video by Luc Laverdure , and I struggled to follow his wizardry.
I was hoping to add just a tiny amount of interactivity using snippets of JS in my Vega viz.
I wish I could convince my manager to give me the time to it would take me to write a custom Kibana plugin, but I don't foresee that happening.

Your other option might be Canvas, it also has some support for interactivity.

I could try Canvas. Sometimes the SQL language is too limited (relative to the Elasticsearch Query Language), but I'd be happy to try it.

I found this post: Kibana Canvas - Support for Interactive features which is really what I want -- especially the click to filter.

Is there some example you can point me to of the "limited" interactivity support that you refer to?

Also, Vega solved many problems for me which is why I was hoping for a Vega solution.
Vega let me do the joins on small data, pick out buried fields from complicated responses to Elasticsearch and in general let me ETL my data for effective visualization.

Here is a sample of my Query and the Vega to interpret the response that I'm not sure I can say in Canvas (maybe the query, but the Vega transform is quite lovely) . :slight_smile:

https://gist.github.com/anelson-vidscale/5406d0b15b15adb3df47be9d180cbf51

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