The Graph api currently relies on entities of the same type (in your case, companies) being found in the same field. If you plot companies from the id and parentId field then id:CompanyB will be represented as a different vertex from parentId:CompanyB. To overcome this you have to put a copy of company names into a common field e.g. parent_and_child_ids.
Note that there is no notion of "up" - we just know these companies are related and so A is not necessarily positioned at the top. Hierarchies are a special form of graph and one that our existing elastic Graph tools are not specialized for. You're probably better off loading data into a dedicated org-chart tool.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.