Vega Kibana Tree Visualization ignore missing parent node

Is there a way to gracefully handle missing parent node in kibana/vega tree visualization? For example, if the below json represents data, since X is non existent parent is it possible to ignore that link?

[
  {"id": "A", "parent": null},
  {"id": "B", "parent": "A"},
  {"id": "C", "parent": "X"}
]

This is more of a Vega question than a Kibana question, but we can try to answer. I think this is technically possible, but I don't see why you would want to: the format you've shown is what Vega expects for their tree layout examples.

If you want to change it, you can filter it out rows with missing parents, or impute a different value for the parent, or maybe come up with some other Vega formula.

Yes, the format here works, but I believe the transform to convert this to tree(stratify) throws error missing: X (as X is not in the ids). Let me go through your suggestions to see if they help.

Sounds like you might be configuring something incorrectly. The docs for stratify are here: https://vega.github.io/vega/docs/transforms/stratify/

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