How to use a Kibana Visualization with own data in a React plugin?


#1

Trying to find examples of a Visualization being used in a React plugin, but all I seem to find is Angular ones which is hard to follow since the plugin generator generates a React plugin and it's recommended to use React now. Say I query ES in my own Kibana plugin and have a result I want to pass into a Kibana Visualization to render, how would I do that?


(Nathan Reese) #2

Can you provide an explanation of what you are trying to accomplish? What does your plugin provide that is not available by the existing visualizations? Why are you trying to use kibana's existing visualizations for rendering?


#3

Sure,

I used the plugin generator to generate the boilerplate for a plugin which is in React.

I don't have a specific use case, more trying to understand the plugin development ecosystem for Kibana.

I played around with replicating something similar to the dev console, and now I'm looking to turn the response into a visualization. I could just use a 3rd party React charting library, but it's usually better to use what's available to stay consistent.. so was hoping there was an easy way to embed a chart in the Kibana React plugin and pass it some data to render.


(Nathan Reese) #4

The existing charting infrastructure in Kibana is a bit of a mess right now and is getting converted to https://elastic.github.io/eui/#/xy-charts-beta/line-chart. I would recommend using EUI XY Charts to create your visualizations and you will be where Kibana is heading.


#5

InOh, interesting! I guess I hadn't updated my tab of EUI in a while.. that wasn't there before. Thanks!


(system) #6

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