VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

D3.js chord.sortSubgroups() Function

Last Updated : 26 Aug, 2020

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

Syntax:

chord.sortSubgroups([compare]);

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

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

Return Value: This function returns the chord layout.

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

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: