VOOZH about

URL: https://www.geeksforgeeks.org/javascript/d3-js-chord-sortchords-function/

⇱ D3.js chord.sortChords() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

D3.js chord.sortChords() Function

Last Updated : 26 Aug, 2020

The chord.sortChords() function in D3.js is used to set the chord comparator to the specified function or null and returns this chord layout.

Syntax:

chord.sortChords(compare);

Parameters: This function accepts a single parameter as mentioned above and described below

  • compare: This parameter is the function to set the chord comparator.

Return Value: This function returns the chord layout.

Below programs illustrate the chord.sortChords() function in D3.js

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: