Use Graph inside plugin


I am developing an external plugin using React. I want to draw graphs inside the same. Is there a library or api using which I can draw custom graphs inside the plugin?


Hi @Sheereen

there's no shareable graph renderer at the moment in Kibana to use.
The Graph app in Kibana is using plain d3 code, while the Service Map is using the cytoscape.js library. You can take inspiration for either one, but there's currently no way to re-use such code.

1 Like

Ok... Thanks a lot

What about vega?

Can I use Vega within plugin to create graphs?

And essentially, both Graphs and Service Map looks the same... and both follow graph theory.

Then why was d3 used for one and cytoscape,js used for other? The reason m8 also help me choose between d3 and cytoscape for creating graphs in my plugin.

I went through both d3 and cytoscape.js briefly and found that the latter is more easy to use and we can focus more on business logic as there is a renderer already.

You can use Vega as well, but it really depends on the use case.

Not sure on why it has been decided on two different rendering techniques, d3 and cytoscape.js, for the two tools. Cytoscape.js is a library to only render networks, while d3 is more a generic tool which allows for more custom visualization types.

1 Like

The use case is, a graph should be build based on data from a table. So each of the nodes will have associated properties. And the underlying table also may/may not change with time... dynamic data.

And all the nodes should be clickable with handlers.

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