简体   繁体   English

AmCharts-如何为力控树加载外部CSV数据?

[英]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? 使用以下示例: https : //www.amcharts.com/demos/force-directed-tree/ CSV文件的外观如何? 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"? 对于线形图,看起来很简单,如以下示例中所述: https : //www.amcharts.com/docs/v4/concepts/data/loading-external-data/#CSV_example但是如果树形图中有“子级”,该怎么办? ?

As this is not mentioned in the docs anywhere, I opened an issue on Github. 由于任何地方的文档中都没有提到这一点,因此我在Github上发布了一个问题

A maintainer replied: 一位维护者回答:

Answering your question: no, you can't load hierarchical data from CSV. 回答您的问题:不,您不能从CSV加载层次结构数据。

Therefore, unfortunately, unless you want to create a single-level tree you can't load CSV data for it. 因此,不幸的是,除非要创建单级树,否则无法为其加载CSV数据。 You can only use JSON. 您只能使用JSON。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM