Loading D3.js data from a simple JSON string

后端 未结 6 798
礼貌的吻别
礼貌的吻别 2020-11-28 06:29

Most of the examples in gallery load data from TSV files.

How can I convert the following to use a local json variable instead of TSV data?

d3.tsv(&quo         


        
6条回答
  •  青春惊慌失措
    2020-11-28 07:07

    Why not simply transform your json to tsv as described by Rob here?

    d3 expects the data or, said in another way, needs the data in a particular format: tsv.The easiest way to resolve your problem is simply formatting your data from json to tsv, which can be done easily using Rob's comments.

提交回复
热议问题