Search code examples
javascriptcsvamchartsamcharts4

AmCharts - how to load external CSV data for force-directed tree?


Using this example: https://www.amcharts.com/demos/force-directed-tree/ What would CSV file look like? For line graph it looks easy as described in this example: https://www.amcharts.com/docs/v4/concepts/data/loading-external-data/#CSV_example But what about that tree graph where you have "children"?


Solution

  • As this is not mentioned in the docs anywhere, I opened an issue on Github.

    A maintainer replied:

    Answering your question: no, you can't load hierarchical data from CSV.

    Therefore, unfortunately, unless you want to create a single-level tree you can't load CSV data for it. You can only use JSON.