![]() |
VOOZH | about |
The transpose() function in D3.js is used to return the transpose of a 2D array. This function helps to visualize the data and making graphs and charts.
Syntax:
d3.transpose(Matrix);
Parameters: This function accept a single parameter as mentioned above and described below:
Return value: It returns an array or the matrix.
Below given are a few examples of transpose function.
Example 1: Without using zip function to form a matrix.
Output:
👁 ImageExample 2: Using zip function to form a matrix.