score:2

Accepted answer

JSON data is typed; that is, the file format distinguishes between string and numerical data. CSV data is untyped: all entries are expressed as strings.

The chart specification above requires some fields to be numerical. When you convert the input data to CSV, you must add a format specifier to specify numerical types for the numerical data columns.

In case of this chart you can use the following for the nodes data:

"format": {
  "type": "tsv",
  "parse": { "id": "number", "name": "string", "parent": "number" }
},

And the following for the links data:

"format": {
  "type": "tsv",
  "parse": { "source": "number", "target": "number" }
},

Related Query

More Query from same tag