From cbf0c5e6270819e525a121ce3f1ac924aa8fdb6d Mon Sep 17 00:00:00 2001 From: Ben <3126319718@qq.com> Date: Thu, 27 Jan 2022 16:13:54 +0800 Subject: [PATCH] Update the parseRows row function description the row function of dsv.parseRows doesn't have the third parameter, because the dataset pass to dsv.parseRows doesn't have the header row. but the descriptions say it can receives the the array of column names as the third parameter of row function. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac2c3d7..437da1d 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ The resulting JavaScript array is: If a *row* conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the `+` operator), but better is to specify a *row* conversion function. See [d3.autoType](#autoType) for a convenient *row* conversion function that infers and coerces common types like numbers and strings. -If a *row* conversion function is specified, the specified function is invoked for each row, being passed an array representing the current row (`d`), the index (`i`) starting at zero for the first row, and the array of column names. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: +If a *row* conversion function is specified, the specified function is invoked for each row, being passed an array representing the current row (`d`), the index (`i`) starting at zero for the first row. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: ```js const data = d3.csvParseRows(string, (d, i) => {