# Vega - Force Directed - Indexe problem

**URL:** <https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [October 14, 2022, 8:52pm UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670 "2022-10-14T20:52:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)\
**Post date:** [October 14, 2022, 8:52pm UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670/1 "2022-10-14T20:52:35Z")

</div>

Hi all,

I'm trying to make a force directed graph using this example ( [vega code](https://vega.github.io/vega/examples/force-directed-layout/) - [Data](https://github.com/d3/d3-plugins/blob/master/graph/data/miserables.json) ). until now I can't do it and I would like to know if the nodes and the links have to identified with a numerical index or if it's possible to use, like I'm trying to do, an alphanumerical index ?  
If you would have a functional example which works not with json data but with an indices it could help me.  
Thx.

---

<div class="post-metadata">

**Author:** ![Felix\_Roessel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felix_roessel/32/41623_2.png) [@Felix\_Roessel](https://discuss.elastic.co/u/Felix_Roessel)\
**Post date:** [October 18, 2022, 8:12am UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670/2 "2022-10-18T08:12:24Z")

</div>

Hey Phildefer,

this is a [working example for the force directed graph within Kibana](https://elastic-content-share.eu/downloads/azure-billing-data-network/).

It is not super easy to get that working as the index needs to be determined while transforming the data in the right shape. In the example you mentioned this is already done within the source data files.

Let me know if the example helps you to get it done.

---

<div class="post-metadata">

**Author:** ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)\
**Post date:** [October 18, 2022, 6:55pm UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670/3 "2022-10-18T18:55:49Z")

</div>

Hi Felix  
Thank you so much for this example but the file I have downloaded is a ndjson file and I don't how to convert it into a text file to import into the vega editor of Kibana.

---

<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:** [November 15, 2022, 1:15am UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670/4 "2022-11-15T01:15:01Z")

</div>



---

<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 13, 2022, 1:15am UTC](https://discuss.elastic.co/t/vega-force-directed-indexe-problem/316670/5 "2022-12-13T01:15:18Z")

</div>

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