![]() |
VOOZH | about |
The zip() function in D3.js is used to form a matrix from an array given as a parameter. It helps to visualize data. D3.js stands for Data-Driven Documents.
Syntax:
d3.zip(arraysโฆ)
Parameters: This function accepts a single parameter as mentioned above and described below:
Return Value: It returns the array of arrays.
Below examples illustrate the zip() function in D3.js:
Example 1:
Output:
Example 2: When nothing is given in the parameter an empty array is returned by the zip function.
Output: